You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by sl...@apache.org on 2013/02/02 01:42:47 UTC
git commit: Update test paramaters for testZkManagerFlappingdetection
Updated Branches:
refs/heads/master e1b441135 -> 3b473667d
Update test paramaters for testZkManagerFlappingdetection
Project: http://git-wip-us.apache.org/repos/asf/incubator-helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-helix/commit/3b473667
Tree: http://git-wip-us.apache.org/repos/asf/incubator-helix/tree/3b473667
Diff: http://git-wip-us.apache.org/repos/asf/incubator-helix/diff/3b473667
Branch: refs/heads/master
Commit: 3b473667df9b063409cd0a7e135218cd30a3df21
Parents: e1b4411
Author: slu2011 <lu...@gmail.com>
Authored: Fri Feb 1 16:42:36 2013 -0800
Committer: slu2011 <lu...@gmail.com>
Committed: Fri Feb 1 16:42:36 2013 -0800
----------------------------------------------------------------------
.../manager/zk/TestZkManagerFlappingDetection.java | 19 ++++----------
1 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-helix/blob/3b473667/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
index d30e63a..67d8a6b 100644
--- a/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
+++ b/helix-core/src/test/java/org/apache/helix/manager/zk/TestZkManagerFlappingDetection.java
@@ -61,9 +61,10 @@ public class TestZkManagerFlappingDetection extends ZkIntegrationTestBase
for(int i = 0;i < 4; i++)
{
ZkTestHelper.expireSession(zkClient);
- Thread.sleep(500);
+ Thread.sleep(1000);
if(i < 5)
{
+ //System.out.println(i);
Assert.assertTrue(manager.isConnected());
}
}
@@ -71,6 +72,7 @@ public class TestZkManagerFlappingDetection extends ZkIntegrationTestBase
for(int i = 0; i < 20; i++)
{
Thread.sleep(500);
+ System.out.println(i);
if(!manager.isConnected()) break;
}
Assert.assertFalse(manager.isConnected());
@@ -84,15 +86,6 @@ public class TestZkManagerFlappingDetection extends ZkIntegrationTestBase
String instanceName = "localhost_" + (12918 + 1);
final String clusterName = className + "_" + methodName + UUID.randomUUID();
- TestHelper.setupCluster(clusterName, ZK_ADDR, 12918, // participant port
- "localhost", // participant name prefix
- "TestDB", // resource name prefix
- 1, // resources
- 10, // partitions per resource
- 5, // number of nodes
- 3, // replicas
- "MasterSlave",
- true); // do rebalance
testDisconnectFlappingWindow2(instanceName, InstanceType.PARTICIPANT);
testDisconnectFlappingWindow2("admin", InstanceType.ADMINISTRATOR);
}
@@ -115,7 +108,7 @@ public class TestZkManagerFlappingDetection extends ZkIntegrationTestBase
// flapping time window to 5 sec
- System.setProperty("helixmanager.flappingTimeWindow", "10000");
+ System.setProperty("helixmanager.flappingTimeWindow", "15000");
System.setProperty("helixmanager.maxDisconnectThreshold", "7");
ZkHelixTestManager manager2 =
new ZkHelixTestManager(clusterName,
@@ -130,12 +123,12 @@ public class TestZkManagerFlappingDetection extends ZkIntegrationTestBase
Thread.sleep(500);
Assert.assertTrue(manager2.isConnected());
}
- Thread.sleep(10000);
+ Thread.sleep(15000);
// Old entries should be cleaned up
for(int i = 0;i < 7; i++)
{
ZkTestHelper.expireSession(zkClient);
- Thread.sleep(500);
+ Thread.sleep(1000);
Assert.assertTrue(manager2.isConnected());
}
ZkTestHelper.disconnectSession(zkClient);