Skip to content

[fix] [test] fix test code create namespace conflict#21941

Merged
Technoboy- merged 1 commit into
apache:masterfrom
thetumbled:Fix_TestCodeNamespaceConflict
Jan 22, 2024
Merged

[fix] [test] fix test code create namespace conflict#21941
Technoboy- merged 1 commit into
apache:masterfrom
thetumbled:Fix_TestCodeNamespaceConflict

Conversation

@thetumbled

@thetumbled thetumbled commented Jan 22, 2024

Copy link
Copy Markdown
Member

Motivation

Running test code org.apache.pulsar.broker.transaction.TransactionTest, exceptions will be throw as:
image

org.apache.pulsar.client.admin.PulsarAdminException$ConflictException: Namespace already exists

	at org.apache.pulsar.client.admin.PulsarAdminException.wrap(PulsarAdminException.java:252)
	at org.apache.pulsar.client.admin.internal.BaseResource.sync(BaseResource.java:352)
	at org.apache.pulsar.client.admin.internal.NamespacesImpl.createNamespace(NamespacesImpl.java:211)
	at org.apache.pulsar.broker.transaction.TransactionTest.testReadCommittedWithCompaction(TransactionTest.java:1858)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

This is because the previous test code has created the same namespace.

Modifications

Using a different namespace to avoid confliction.

Verifying this change

  • Make sure that the change passes the CI checks.

(Please pick either of the following options)

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

If the box was checked, please highlight the changes

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

Matching PR in forked repository

PR in forked repository: thetumbled#35

@Technoboy- Technoboy- added this to the 3.3.0 milestone Jan 22, 2024
@thetumbled

Copy link
Copy Markdown
Member Author

/pulsarbot rerun-failure-checks

@codecov-commenter

codecov-commenter commented Jan 22, 2024

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.62%. Comparing base (153cd5e) to head (7b4e2f8).
⚠️ Report is 1609 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #21941      +/-   ##
============================================
+ Coverage     73.53%   73.62%   +0.09%     
+ Complexity    32433    32427       -6     
============================================
  Files          1861     1861              
  Lines        138675   138673       -2     
  Branches      15184    15182       -2     
============================================
+ Hits         101974   102099     +125     
+ Misses        28840    28677     -163     
- Partials       7861     7897      +36     
Flag Coverage Δ
inttests 24.07% <ø> (?)
systests 23.66% <ø> (-0.12%) ⬇️
unittests 72.91% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 94 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Technoboy-
Technoboy- merged commit b14fcb4 into apache:master Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/test doc-not-needed Your PR changes do not impact docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants