helix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s..@apache.org
Subject [2/2] git commit: [Helix-7]Tune test parameters to fix random test failures
Date Wed, 19 Dec 2012 20:21:19 GMT
[Helix-7]Tune test parameters to fix random test failures

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

Branch: refs/heads/master
Commit: bbdd6ae6b8b446c0fc816acbdfc413fffeb61c90
Parents: e029169
Author: slu2011 <lushi04@gmail.com>
Authored: Wed Dec 19 12:20:51 2012 -0800
Committer: slu2011 <lushi04@gmail.com>
Committed: Wed Dec 19 12:20:51 2012 -0800

----------------------------------------------------------------------
 .../helix/manager/zk/TestLiveInstanceBounce.java   |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/bbdd6ae6/helix-core/src/test/java/org/apache/helix/manager/zk/TestLiveInstanceBounce.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestLiveInstanceBounce.java
b/helix-core/src/test/java/org/apache/helix/manager/zk/TestLiveInstanceBounce.java
index 3cd30d2..65b5528 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestLiveInstanceBounce.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestLiveInstanceBounce.java
@@ -58,12 +58,20 @@ public class TestLiveInstanceBounce extends ZkStandAloneCMTestBaseWithPropertySe
       _startCMResultMap.put(instanceName, result);
       Thread.sleep(100);
     }
-    Thread.sleep(2000);
+    Thread.sleep(4000);
 
     boolean result = ClusterStateVerifier.verifyByPolling(
         new ClusterStateVerifier.BestPossAndExtViewZkVerifier(ZK_ADDR, CLUSTER_NAME), 50
* 1000);
     Assert.assertTrue(result);
     // When a new live instance is created, we still add current state listener to it thus
number should increase by 2
+    for(int j = 0; j < 10; j++)
+    {
+      if(controller.getHandlers().size() == (handlerSize + 2))
+      {
+        break;
+      }
+      Thread.sleep(400);
+    }
     Assert.assertEquals( controller.getHandlers().size(), handlerSize + 2);
   }
 }


Mime
View raw message