zookeeper icon indicating copy to clipboard operation
zookeeper copied to clipboard

ZOOKEEPER-4308: Fix flaky test EagerACLFilterTest

Open kezhuw opened this issue 3 years ago • 1 comments

There are several problems in this test:

  • It uses ParameterizedTest which run tests in single jvm. But ZooKeeperServer.enableEagerACLCheck is static and loaded from env variable.
  • It uses assertNotSame which assert on object reference equiality.
  • It asserts on zkLeader.getLastLoggedZxid() while client connect to connectedServer. There is no happen-before between zkLeader.getLastLoggedZxid() and successful response from other server. The commit and response are routed to different servers and performed asynchronous in each server.

Author: Kezhu Wang [email protected]

Reviewers: maoling [email protected], Mate Szalay-Beko [email protected]

Closes #1851 from kezhuw/ZOOKEEPER-4308-EagerACLFilterTest

(cherry picked from commit 794790c9f6cbacf158493867f3058a6de748b54e)

kezhuw avatar Jun 29 '22 15:06 kezhuw

@maoling @symat This is backport of #1851 to branch 3.6. Automatic cherry-pick fails due to junit changes.

kezhuw avatar Jun 29 '22 15:06 kezhuw

@kezhuw Thanks for your contribution. Now we have this fix at all branches.

maoling avatar Sep 04 '22 08:09 maoling