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

[Tests] Use TestRetrySupport for BaseMetadataStoreTests to cleanup state between retries #11771

Merged
merged 2 commits into from
Aug 25, 2021

Conversation

lhotari
Copy link
Member

@lhotari lhotari commented Aug 25, 2021

Motivation

Attempt to mitigate the flaky tests in LockManagerTest #11690 and ZkSessionTest #11032 which use the BaseMetadataStoreTests base class. Test retries didn't succeed since the state didn't get cleaned between tests.

The downside of better test retries is that it might suppress production issues in metadata store implementation. The flakiness might be a sign of a real problem.

Modifications

  • use the TestRetrySupport base class for BaseMetadataStoreTests to cleanup state between retries.
  • also improve TestRetrySupport javadoc since it has special requirements for the implementation.

protected TestZKServer zks;

@BeforeClass(alwaysRun = true)
void setup() throws Exception {
@Override
protected void setup() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we remove AfterClass/BeforeClass annotations?

Copy link
Member Author

Choose a reason for hiding this comment

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

no, TestRetrySupport doesn't change that in any way.

Copy link
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

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

Lgtm

@eolivelli eolivelli merged commit 7de9992 into apache:master Aug 25, 2021
eolivelli pushed a commit to datastax/pulsar that referenced this pull request Aug 25, 2021
…ate between retries (apache#11771)

* [Tests] Use TestRetrySupport for BaseMetadataStoreTests to cleanup state between retries

- mitigates flaky tests in LockManagerTest apache#11690 and ZkSessionTest apache#11032

* [Tests] Add notes about the correct usage of TestRetrySupport

(cherry picked from commit 7de9992)
@lhotari
Copy link
Member Author

lhotari commented Aug 25, 2021

There's an additional change #11778 which is needed for making the test reties work for BaseMetadataStoreTests.

codelipenghui pushed a commit that referenced this pull request Sep 9, 2021
…ate between retries (#11771)

* [Tests] Use TestRetrySupport for BaseMetadataStoreTests to cleanup state between retries

- mitigates flaky tests in LockManagerTest #11690 and ZkSessionTest #11032

* [Tests] Add notes about the correct usage of TestRetrySupport

(cherry picked from commit 7de9992)
@codelipenghui codelipenghui added the cherry-picked/branch-2.8 Archived: 2.8 is end of life label Sep 9, 2021
bharanic-dev pushed a commit to bharanic-dev/pulsar that referenced this pull request Mar 18, 2022
…ate between retries (apache#11771)

* [Tests] Use TestRetrySupport for BaseMetadataStoreTests to cleanup state between retries

- mitigates flaky tests in LockManagerTest apache#11690 and ZkSessionTest apache#11032

* [Tests] Add notes about the correct usage of TestRetrySupport
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.

None yet

3 participants