zookeeper
zookeeper copied to clipboard
ZOOKEEPER-4308: Fix flaky test EagerACLFilterTest
There are several problems in this test:
- It uses
ParameterizedTestwhich run tests in single jvm. ButZooKeeperServer.enableEagerACLCheckisstaticand loaded from env variable. - It uses
assertNotSamewhich assert on object reference equiality. - It asserts on
zkLeader.getLastLoggedZxid()while client connect toconnectedServer. There is no happen-before betweenzkLeader.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)
@maoling @symat This is backport of #1851 to branch 3.6. Automatic cherry-pick fails due to junit changes.
@kezhuw Thanks for your contribution. Now we have this fix at all branches.