ACCUMULO-2433 Try to stabilize listscans on ShellServerTest

Remove the ZKI and Connector timing from the 5s that we used to look
for the slow scan that was running. Increase the amount of time inbetween
calls to listscans.


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

Branch: refs/heads/master
Commit: c1964b27fb7d9fed9b5f68f66ca7532f7964cdd6
Parents: 7ec60f1
Author: Josh Elser <els...@apache.org>
Authored: Thu Mar 27 12:41:34 2014 -0700
Committer: Josh Elser <els...@apache.org>
Committed: Thu Mar 27 12:41:34 2014 -0700

----------------------------------------------------------------------
 .../java/org/apache/accumulo/test/ShellServerTest.java | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/c1964b27/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java 
b/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
index 9b2ab33..7bda585 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellServerTest.java
@@ -818,12 +818,15 @@ public class ShellServerTest {
     }
     exec("config -t " + table + " -s 
table.iterator.scan.slow=30,org.apache.accumulo.test.functional.SlowIterator", 
true);
     exec("config -t " + table + " -s 
table.iterator.scan.slow.opt.sleepTime=500", true);
+    
+
+    ZooKeeperInstance instance = new 
ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
+    Connector connector = instance.getConnector("root", new 
PasswordToken(secret));
+    final Scanner s = connector.createScanner(table, Constants.NO_AUTHS);
+
     Thread thread = new Thread() {
       public void run() {
         try {
-          ZooKeeperInstance instance = new 
ZooKeeperInstance(cluster.getInstanceName(), cluster.getZooKeepers());
-          Connector connector = instance.getConnector("root", new 
PasswordToken(secret));
-          Scanner s = connector.createScanner(table, Constants.NO_AUTHS);
           for (@SuppressWarnings("unused")
           Entry<Key,Value> kv : s)
             ;
@@ -835,7 +838,7 @@ public class ShellServerTest {
     thread.start();
 
     List<String> scans = new ArrayList<String>();
-    // Try to find the active scan for about 5seconds
+    // Try to find the active scan for about 15seconds
     for (int i = 0; i < 50 && scans.isEmpty(); i++) {
       String currentScans = exec("listscans", true);
       String[] lines = currentScans.split("\n");
@@ -845,7 +848,7 @@ public class ShellServerTest {
           scans.add(currentScan);
         }
       }
-      UtilWaitThread.sleep(100);
+      UtilWaitThread.sleep(300);
     }
     thread.join();
 

Reply via email to