Skip to content

[fix][test] Fix flaky PersistentSubscriptionTest#20434

Merged
lhotari merged 3 commits into
apache:masterfrom
lhotari:lh-fix-flaky-test-PersistentSubscriptionTest
May 31, 2023
Merged

[fix][test] Fix flaky PersistentSubscriptionTest#20434
lhotari merged 3 commits into
apache:masterfrom
lhotari:lh-fix-flaky-test-PersistentSubscriptionTest

Conversation

@lhotari

@lhotari lhotari commented May 29, 2023

Copy link
Copy Markdown
Member

Fixes #19396

Motivation

PersistentSubscriptionTest.setup is flaky because Mockito isn't thread safe.

Modifications

Replace the usage of Mockito for setting the TransactionBufferProvider and TransactionPendingAckStoreProvider
in the test.

Documentation

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

@lhotari lhotari added this to the 3.1.0 milestone May 29, 2023
@lhotari lhotari self-assigned this May 29, 2023
@github-actions github-actions Bot added the doc-not-needed Your PR changes do not impact docs label May 29, 2023
@codecov-commenter

Copy link
Copy Markdown

Codecov Report

Merging #20434 (36ac8f5) into master (b5ef09e) will decrease coverage by 0.04%.
The diff coverage is 62.50%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #20434      +/-   ##
============================================
- Coverage     72.92%   72.89%   -0.04%     
+ Complexity    31897    31868      -29     
============================================
  Files          1865     1865              
  Lines        138439   138443       +4     
  Branches      15192    15192              
============================================
- Hits         100953   100914      -39     
- Misses        29474    29503      +29     
- Partials       8012     8026      +14     
Flag Coverage Δ
inttests 24.09% <12.50%> (-0.07%) ⬇️
systests 24.97% <0.00%> (+0.09%) ⬆️
unittests 72.17% <62.50%> (-0.05%) ⬇️

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

Impacted Files Coverage Δ
...ker/service/persistent/PersistentSubscription.java 75.43% <50.00%> (ø)
...rg/apache/pulsar/io/kafka/KafkaAbstractSource.java 69.06% <60.00%> (+0.17%) ⬆️
...n/java/org/apache/pulsar/broker/PulsarService.java 81.88% <100.00%> (+0.11%) ⬆️

... and 73 files with indirect coverage changes

@lhotari lhotari requested a review from tisonkun May 30, 2023 08:10

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One comment inline.

Comment thread pulsar-broker/src/main/java/org/apache/pulsar/broker/PulsarService.java Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky-test: PersistentSubscriptionTest.setup

4 participants