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]: Flaky-test: GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic #23666

Merged
merged 1 commit into from
Jan 3, 2025

Conversation

visxu
Copy link
Contributor

@visxu visxu commented Dec 2, 2024

flaky-test: GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic

Fixes #23416

Motivation

Error:  org.apache.pulsar.broker.admin.GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic[true, true, false](8)  Time elapsed: 10.311 s  <<< FAILURE!
  org.awaitility.core.ConditionTimeoutException: Assertion condition expected [99999] but found [100000] within 10 seconds.
  	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
  	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
  	at org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
  	at org.awaitility.core.ConditionFactory.until(ConditionFactory.java:985)
  	at org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:769)
  	at org.apache.pulsar.broker.admin.GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic(GetPartitionMetadataMultiBrokerTest.java:296)

Modifications

int lookupPermitsBefore = getLookupRequestPermits();, put this code at the beginning of ut execution.

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.

(or)

This change is already covered by existing tests, such as (please describe tests).

(or)

This change added tests and can be verified as follows:

(example:)

  • Added integration tests for end-to-end deployment with large payloads (10MB)
  • Extended integration test for recovery after broker failure

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:

flaky-test: GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Dec 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Dec 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.39%. Comparing base (bbc6224) to head (37d4293).
Report is 772 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##             master   #23666      +/-   ##
============================================
+ Coverage     73.57%   74.39%   +0.82%     
- Complexity    32624    35057    +2433     
============================================
  Files          1877     1944      +67     
  Lines        139502   147331    +7829     
  Branches      15299    16258     +959     
============================================
+ Hits         102638   109614    +6976     
- Misses        28908    29271     +363     
- Partials       7956     8446     +490     
Flag Coverage Δ
inttests 27.31% <ø> (+2.73%) ⬆️
systests 24.39% <ø> (+0.07%) ⬆️
unittests 73.79% <ø> (+0.94%) ⬆️

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

see 667 files with indirect coverage changes

@visxu
Copy link
Contributor Author

visxu commented Dec 4, 2024

Hi, @lhotari
Could you help to review it if you're available, thanks.

@pdolif
Copy link
Contributor

pdolif commented Dec 4, 2024

@visxu With this we would also ensure that no lookup related to the __change_events topic is in progress while setting the lookupPermitsBefore variable, right?

@visxu
Copy link
Contributor Author

visxu commented Dec 4, 2024

@visxu With this we would also ensure that no lookup related to the __change_events topic is in progress while setting the lookupPermitsBefore variable, right?

Yes, sure. There's no lookup operation(like getBroker in the UT) before getLookupRequestPermits().

@visxu
Copy link
Contributor Author

visxu commented Dec 19, 2024

@lhotari Could you help to approve this? Thanks in advance.

@visxu
Copy link
Contributor Author

visxu commented Dec 23, 2024

Hi, @pdolif . Could you help loop other committers to approve this ??

@lhotari lhotari added this to the 4.1.0 milestone Jan 3, 2025
@lhotari lhotari merged commit 1cdb5db into apache:master Jan 3, 2025
55 checks passed
lhotari pushed a commit that referenced this pull request Jan 3, 2025
…atibilityDifferentBrokersForNonPersistentTopic (#23666)

(cherry picked from commit 1cdb5db)
lhotari pushed a commit that referenced this pull request Jan 3, 2025
…atibilityDifferentBrokersForNonPersistentTopic (#23666)

(cherry picked from commit 1cdb5db)
lhotari pushed a commit that referenced this pull request Jan 3, 2025
…atibilityDifferentBrokersForNonPersistentTopic (#23666)

(cherry picked from commit 1cdb5db)
nikhil-ctds pushed a commit to datastax/pulsar that referenced this pull request Jan 7, 2025
…atibilityDifferentBrokersForNonPersistentTopic (apache#23666)

(cherry picked from commit 1cdb5db)
(cherry picked from commit 36752e9)
srinath-ctds pushed a commit to datastax/pulsar that referenced this pull request Jan 8, 2025
…atibilityDifferentBrokersForNonPersistentTopic (apache#23666)

(cherry picked from commit 1cdb5db)
(cherry picked from commit 36752e9)
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: GetPartitionMetadataMultiBrokerTest.testCompatibilityDifferentBrokersForNonPersistentTopic
4 participants