jiajunwang commented on a change in pull request #1492:
URL: https://github.com/apache/helix/pull/1492#discussion_r514027896
##########
File path:
helix-core/src/test/java/org/apache/helix/integration/TestCleanupExternalView.java
##########
@@ -109,18 +109,14 @@ public void test() throws Exception {
// System.out.println("re-enabling controller");
admin.enableCluster(clusterName, true);
- ExternalView externalView = null;
- for (int i = 0; i < 10; i++) {
- Thread.sleep(100);
- externalView = accessor.getProperty(keyBuilder.externalView("TestDB0"));
- // System.out.println("externalView: " + externalView);
- if (externalView == null) {
- break;
- }
- }
- Assert.assertNull(externalView, "external-view for TestDB0 should be
removed, but was: "
- + externalView);
+ result = TestHelper.verify(() -> {
+ ExternalView externalView =
accessor.getProperty(keyBuilder.externalView("TestDB0"));
+ return externalView == null;
+ }, TestHelper.WAIT_DURATION);
+
+ ExternalView ev = accessor.getProperty(keyBuilder.externalView("TestDB0"));
Review comment:
If it is just for the assert log, then you can do this,
ExternalView externalView = null;
result = TestHelper.verify(() -> {
externalView = accessor.getProperty(keyBuilder.externalView("TestDB0"));
return externalView == null;
}, TestHelper.WAIT_DURATION);
Assert.assertTrue(result, "external-view for TestDB0 should be removed, but
was: " + externalView);
----------------------------------------------------------------
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]