kaisun2000 commented on issue #1419:
URL: https://github.com/apache/helix/issues/1419#issuecomment-704021969
LOG 2510
>START TestHelixZkClient testZkConnectionManager at Tue Oct 06 02:02:06 UTC
2020
2020-10-06T02:02:06.7570703Z END TestHelixZkClient testZkConnectionManager
at Tue Oct 06 02:02:06 UTC 2020, took: 226ms.
2020-10-06T02:02:06.7571961Z START TestHelixZkClient testSharingZkClient at
Tue Oct 06 02:02:06 UTC 2020
2020-10-06T02:02:06.7651298Z sharedZkClient A increased n1 with path:
/testSharingZkClient/IDEALSTATES/test_helix_zkclienttestSharingZkClient
2020-10-06T02:02:06.7657051Z sharedZkClient B increased n0 with path:
/testSharingZkClient/IDEALSTATES/test_helix_zkclienttestSharingZkClient
2020-10-06T02:02:06.7676143Z Created test
path:/testSharingZkClient/IDEALSTATES/test_helix_zkclienttestSharingZkClient
2020-10-06T02:02:06.7683131Z sharedZkClient B increased n0 with path:
/testSharingZkClient/IDEALSTATES/test_helix_zkclienttestSharingZkClient
2020-10-06T02:02:06.7684654Z sharedZkClient A increased n0 with path:
/testSharingZkClient/IDEALSTATES/test_helix_zkclienttestSharingZkClient
2020-10-06T02:02:06.8269303Z END TestHelixZkClient testSharingZkClient at
Tue Oct 06 02:02:06 UTC 2020, took: 70ms.
2020-10-06T02:02:06.8271632Z AfterClass:TestHelixZkClient afterclass of
ZkTestBase called!
>123963Z [ERROR] Failures:
2020-10-06T03:23:24.3129550Z [ERROR]
TestHelixZkClient.testSharingZkClient:141 expected:<0> but was:<1>
code:
```
final int[] notificationCountA = {0, 0};
sharedZkClientA.subscribeDataChanges(TEST_PATH, new IZkDataListener() {
@Override
public void handleDataChange(String s, Object o) {
notificationCountA[0]++;
System.out.println("sharedZkClient A increased n0 with path: " + s);
}
@Override
public void handleDataDeleted(String s) {
notificationCountA[1]++;
System.out.println("sharedZkClient A increased n1 with path: " + s);
}
});
final int[] notificationCountB = {0, 0};
sharedZkClientB.subscribeDataChanges(TEST_PATH, new IZkDataListener() {
@Override
public void handleDataChange(String s, Object o) {
notificationCountB[0]++;
System.out.println("sharedZkClient B increased n0 with path: " + s);
}
@Override
public void handleDataDeleted(String s) {
notificationCountB[1]++;
System.out.println("sharedZkClient B increased n1 with path: " + s);
}
});
// Modify using client A and client B will get notification.
sharedZkClientA.createPersistent(TEST_PATH, true);
System.out.println("Created test path:" + TEST_PATH);
Assert.assertTrue(TestHelper.verify(() -> notificationCountB[0] == 1,
TestHelper.WAIT_DURATION));
Assert.assertEquals(notificationCountB[1], 0);
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]