Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Jan 22, 2024

Conversation

thetumbled
Copy link
Member

@thetumbled thetumbled commented Jan 22, 2024

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
Member Author

/pulsarbot rerun-failure-checks

@codecov-commenter
Copy link

Codecov Report

Attention: 1 lines in your changes are missing coverage. Please review.

Comparison is base (153cd5e) 73.53% compared to head (7b4e2f8) 73.62%.
Report is 2 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% <0.00%> (?)
systests 23.66% <0.00%> (-0.12%) ⬇️
unittests 72.91% <80.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...che/bookkeeper/mledger/impl/ManagedCursorImpl.java 79.42% <80.00%> (+0.20%) ⬆️

... and 93 files with indirect coverage changes

@Technoboy- Technoboy- merged commit b14fcb4 into apache:master Jan 22, 2024
52 of 53 checks passed
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