Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.13.0
-
None
-
None
-
Patch
Description
TestZkProcessorLatch brings up an EmbeddedZk and uses it to test the latch behavior. However, the unit tests share the latchId, and this can cause failures when tests are not run in order.
Example failures are listed below:
Gradle test > org.apache.samza.zk.TestZkProcessorLatch.testSingleCountdown > captured output:
Started single countdown
targetPath /group1/latch_l1/0000000002
targetPath /group1/latch_l1/0000000002
targetPath /group1/latch_l1/0000000002
countDown created /group1/latch_l1/0000000000
testSingleCountdown FAILED
java.lang.AssertionError: Failed to get.
at org.junit.Assert.fail(Assert.java:91)
at org.apache.samza.zk.TestZkProcessorLatch.testSingleCountdown(TestZkProcessorLatch.java:290)
Gradle test > org.apache.samza.zk.TestZkProcessorLatch.testLatchExpires > captured output:
countDown created /group1/latch_l1/0000000001
countDown created /group1/latch_l1/0000000002
testLatchExpires FAILED
org.I0Itec.zkclient.exception.ZkException: org.apache.zookeeper.KeeperException$NotEmptyException: KeeperErrorCode = Directory not empty for /group1/latch_l1
at org.I0Itec.zkclient.exception.ZkException.create(ZkException.java:68)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:1000)
at org.I0Itec.zkclient.ZkClient.delete(ZkClient.java:1047)
at org.I0Itec.zkclient.ZkClient.delete(ZkClient.java:1042)
at org.I0Itec.zkclient.ZkClient.deleteRecursive(ZkClient.java:791)
at org.I0Itec.zkclient.ZkClient.deleteRecursive(ZkClient.java:786)
at org.apache.samza.zk.ZkUtils.deleteRoot(ZkUtils.java:268)
at org.apache.samza.zk.ZkCoordinationUtils.reset(ZkCoordinationUtils.java:45)
at org.apache.samza.zk.TestZkProcessorLatch.testSetup(TestZkProcessorLatch.java:69)
Caused by:
org.apache.zookeeper.KeeperException$NotEmptyException: KeeperErrorCode = Directory not empty for /group1/latch_l1
at org.apache.zookeeper.KeeperException.create(KeeperException.java:125)
at org.apache.zookeeper.KeeperException.create(KeeperException.java:51)
at org.apache.zookeeper.ZooKeeper.delete(ZooKeeper.java:873)
at org.I0Itec.zkclient.ZkConnection.delete(ZkConnection.java:109)
at org.I0Itec.zkclient.ZkClient$11.call(ZkClient.java:1051)
at org.I0Itec.zkclient.ZkClient.retryUntilConnected(ZkClient.java:990)
Attachments
Issue Links
- is depended upon by
-
SAMZA-1190 Flaky unit tests
- Open
- relates to
-
SAMZA-1151 create ZkCoordination service
- Resolved