You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/10/29 06:42:56 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #1492: fix TestCleanupExternalView.test

jiajunwang commented on a change in pull request #1492:
URL: https://github.com/apache/helix/pull/1492#discussion_r514026683



##########
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:
       Why get it once more?




----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org