helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [2/8] helix git commit: Fix TestBucketizedResource.
Date Thu, 01 Nov 2018 23:02:16 GMT
Fix TestBucketizedResource.


Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/f9bc9f8c
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/f9bc9f8c
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/f9bc9f8c

Branch: refs/heads/master
Commit: f9bc9f8c69a480c87f89435b8b59f3ca04e8aeb0
Parents: 3721c1f
Author: Lei Xia <lxia@linkedin.com>
Authored: Wed Oct 10 10:14:25 2018 -0700
Committer: Junkai Xue <jxue@linkedin.com>
Committed: Thu Nov 1 14:38:27 2018 -0700

----------------------------------------------------------------------
 .../helix/integration/TestBucketizedResource.java   | 16 ++++++++++++----
 1 file changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/f9bc9f8c/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
b/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
index 27a7729..d10234d 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/TestBucketizedResource.java
@@ -121,7 +121,7 @@ public class TestBucketizedResource extends ZkTestBase {
   }
 
   @Test
-  public void testBounceDisableAndDrop() {
+  public void testBounceDisableAndDrop() throws Exception {
     String className = TestHelper.getTestClassName();
     String methodName = TestHelper.getTestMethodName();
     String clusterName = className + "_" + methodName;
@@ -154,7 +154,7 @@ public class TestBucketizedResource extends ZkTestBase {
     participants[0].syncStop();
     participants[0] = new MockParticipantManager(ZK_ADDR, clusterName, instanceNames.get(0));
     participants[0].syncStart();
-    
+
     Assert.assertTrue(_clusterVerifier.verifyByPolling());
 
     // make sure participants[0]'s current state is bucketzied correctly during carryover
@@ -176,8 +176,16 @@ public class TestBucketizedResource extends ZkTestBase {
     Assert.assertTrue(_clusterVerifier.verifyByPolling());
 
     // make sure external-view is cleaned up
-    path = keyBuilder.externalView(dbName).getPath();
-    boolean result = _baseAccessor.exists(path, 0);
+    final String evPath = keyBuilder.externalView(dbName).getPath();
+
+    TestHelper.verify(new TestHelper.Verifier() {
+        @Override
+        public boolean verify() {
+          return !_baseAccessor.exists(evPath, 0);
+        }
+      }, 3000);
+
+    boolean result = _baseAccessor.exists(evPath, 0);
     Assert.assertFalse(result);
 
     // clean up


Mime
View raw message