ACCUMULO-4139 Fix ExistingMacIT test bug

Make ExistingMacIT wait the full ZK timeout (plus half a second) based on mini's
configured ZK timeout value.


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

Branch: refs/heads/master
Commit: d36e317a83765984cb83aee27b7616bb2aee226d
Parents: 95f5aff
Author: Christopher Tubbs <ctubb...@apache.org>
Authored: Wed Feb 10 12:58:07 2016 -0500
Committer: Christopher Tubbs <ctubb...@apache.org>
Committed: Wed Feb 10 12:58:07 2016 -0500

----------------------------------------------------------------------
 test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d36e317a/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java 
b/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java
index 323888a..bef2486 100644
--- a/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ExistingMacIT.java
@@ -29,6 +29,7 @@ import org.apache.accumulo.core.client.BatchWriterConfig;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.Scanner;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
+import org.apache.accumulo.core.conf.AccumuloConfiguration;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
@@ -100,7 +101,8 @@ public class ExistingMacIT extends ConfigurableMacIT {
     }
 
     // TODO clean out zookeeper? following sleep waits for ephemeral nodes to 
go away
-    UtilWaitThread.sleep(10000);
+    long zkTimeout = 
AccumuloConfiguration.getTimeInMillis(getCluster().getConfig().getSiteConfig().get(Property.INSTANCE_ZK_TIMEOUT.getKey()));
+    UtilWaitThread.sleep(zkTimeout + 500);
 
     File hadoopConfDir = createTestDir(ExistingMacIT.class.getSimpleName() + 
"_hadoop_conf");
     FileUtils.deleteQuietly(hadoopConfDir);

Reply via email to