accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e..@apache.org
Subject [4/6] accumulo git commit: ACCUMULO-2346 update all sleeps to a specific time unit
Date Fri, 17 Jul 2015 18:53:08 GMT
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
index dcc3124..068000d 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/DeleteRowsSplitIT.java
@@ -25,6 +25,7 @@ import java.util.List;
 import java.util.Map.Entry;
 import java.util.SortedSet;
 import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
@@ -34,13 +35,14 @@ import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 // attempt to reproduce ACCUMULO-315
 public class DeleteRowsSplitIT extends AccumuloClusterHarness {
 
@@ -101,7 +103,7 @@ public class DeleteRowsSplitIT extends AccumuloClusterHarness {
       };
       t.start();
 
-      UtilWaitThread.sleep(test * 2);
+      sleepUninterruptibly(test * 2, TimeUnit.MILLISECONDS);
 
       conn.tableOperations().deleteRows(tableName, start, end);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java b/test/src/main/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
index 2251d4b..62bac85 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/DynamicThreadPoolsIT.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.test.functional;
 import static org.junit.Assert.fail;
 
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.client.ClientConfiguration;
@@ -34,7 +35,6 @@ import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
 import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.trace.Tracer;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.test.TestIngest;
@@ -43,6 +43,8 @@ import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class DynamicThreadPoolsIT extends AccumuloClusterHarness {
 
   @Override
@@ -96,7 +98,7 @@ public class DynamicThreadPoolsIT extends AccumuloClusterHarness {
     c.tableOperations().flush(firstTable, null, null, true);
     for (int i = 1; i < tables.length; i++)
       c.tableOperations().clone(firstTable, tables[i], true, null, null);
-    UtilWaitThread.sleep(11 * 1000); // time between checks of the thread pool sizes
+    sleepUninterruptibly(11, TimeUnit.SECONDS); // time between checks of the thread pool sizes
     Credentials creds = new Credentials(getAdminPrincipal(), getAdminToken());
     for (int i = 1; i < tables.length; i++)
       c.tableOperations().compact(tables[i], null, null, true, false);
@@ -119,7 +121,7 @@ public class DynamicThreadPoolsIT extends AccumuloClusterHarness {
       System.out.println("count " + count);
       if (count > 3)
         return;
-      UtilWaitThread.sleep(500);
+      sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
     }
     fail("Could not observe higher number of threads after changing the config");
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/ExamplesIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ExamplesIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ExamplesIT.java
index 671a6bb..71ddbcd 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ExamplesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ExamplesIT.java
@@ -30,6 +30,7 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
@@ -52,7 +53,6 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.user.AgeOffFilter;
 import org.apache.accumulo.core.iterators.user.SummingCombiner;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.examples.simple.client.Flush;
 import org.apache.accumulo.examples.simple.client.RandomBatchScanner;
 import org.apache.accumulo.examples.simple.client.RandomBatchWriter;
@@ -102,6 +102,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class ExamplesIT extends AccumuloClusterHarness {
   private static final Logger log = LoggerFactory.getLogger(ExamplesIT.class);
@@ -171,7 +172,7 @@ public class ExamplesIT extends AccumuloClusterHarness {
       MiniAccumuloClusterImpl impl = (MiniAccumuloClusterImpl) cluster;
       trace = impl.exec(TraceServer.class);
       while (!c.tableOperations().exists("trace"))
-        UtilWaitThread.sleep(500);
+        sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
     }
     String[] args;
     if (saslEnabled) {
@@ -286,13 +287,13 @@ public class ExamplesIT extends AccumuloClusterHarness {
     is = new IteratorSetting(10, AgeOffFilter.class);
     AgeOffFilter.setTTL(is, 1000L);
     c.tableOperations().attachIterator(tableName, is);
-    UtilWaitThread.sleep(500); // let zookeeper updates propagate.
+    sleepUninterruptibly(500, TimeUnit.MILLISECONDS); // let zookeeper updates propagate.
     bw = c.createBatchWriter(tableName, bwc);
     Mutation m = new Mutation("foo");
     m.put("a", "b", "c");
     bw.addMutation(m);
     bw.close();
-    UtilWaitThread.sleep(1000);
+    sleepUninterruptibly(1, TimeUnit.SECONDS);
     assertEquals(0, Iterators.size(c.createScanner(tableName, Authorizations.EMPTY).iterator()));
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java b/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
index 6de8e93..7f11851 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/GarbageCollectorIT.java
@@ -26,6 +26,7 @@ import java.util.Collections;
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
@@ -46,7 +47,6 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.util.ServerServices;
 import org.apache.accumulo.core.util.ServerServices.Service;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooLock;
 import org.apache.accumulo.gc.SimpleGarbageCollector;
@@ -68,6 +68,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import com.google.common.collect.Iterators;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class GarbageCollectorIT extends ConfigurableMacBase {
   private static final String OUR_SECRET = "itsreallysecret";
@@ -122,7 +123,7 @@ public class GarbageCollectorIT extends ConfigurableMacBase {
     c.tableOperations().compact("test_ingest", null, null, true, true);
     int before = countFiles();
     while (true) {
-      UtilWaitThread.sleep(1000);
+      sleepUninterruptibly(1, TimeUnit.SECONDS);
       int more = countFiles();
       if (more <= before)
         break;
@@ -131,7 +132,7 @@ public class GarbageCollectorIT extends ConfigurableMacBase {
 
     // restart GC
     getCluster().start();
-    UtilWaitThread.sleep(15 * 1000);
+    sleepUninterruptibly(15, TimeUnit.SECONDS);
     int after = countFiles();
     VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
     assertTrue(after < before);
@@ -146,7 +147,7 @@ public class GarbageCollectorIT extends ConfigurableMacBase {
     addEntries(c, new BatchWriterOpts());
     cluster.getConfig().setDefaultMemory(10, MemoryUnit.MEGABYTE);
     Process gc = cluster.exec(SimpleGarbageCollector.class);
-    UtilWaitThread.sleep(20 * 1000);
+    sleepUninterruptibly(20, TimeUnit.SECONDS);
     String output = "";
     while (!output.contains("delete candidates has exceeded")) {
       byte buffer[] = new byte[10 * 1024];
@@ -170,7 +171,7 @@ public class GarbageCollectorIT extends ConfigurableMacBase {
     c.tableOperations().create(table);
     // let gc run for a bit
     cluster.start();
-    UtilWaitThread.sleep(20 * 1000);
+    sleepUninterruptibly(20, TimeUnit.SECONDS);
     killMacGc();
     // kill tservers
     for (ProcessReference ref : cluster.getProcesses().get(ServerType.TABLET_SERVER)) {
@@ -218,7 +219,7 @@ public class GarbageCollectorIT extends ConfigurableMacBase {
     try {
       String output = "";
       while (!output.contains("Ingoring invalid deletion candidate")) {
-        UtilWaitThread.sleep(250);
+        sleepUninterruptibly(250, TimeUnit.MILLISECONDS);
         try {
           output = FunctionalTestUtils.readAll(cluster, SimpleGarbageCollector.class, gc);
         } catch (IOException ioe) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java b/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
index 59d8259..f6ecf20 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/HalfDeadTServerIT.java
@@ -28,12 +28,12 @@ import java.io.InputStreamReader;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.cli.ScannerOpts;
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.util.Daemon;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.start.Main;
@@ -43,6 +43,8 @@ import org.apache.accumulo.tserver.TabletServer;
 import org.apache.hadoop.conf.Configuration;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class HalfDeadTServerIT extends ConfigurableMacBase {
 
   @Override
@@ -139,22 +141,22 @@ public class HalfDeadTServerIT extends ConfigurableMacBase {
     DumpOutput t = new DumpOutput(tserver.getInputStream());
     try {
       t.start();
-      UtilWaitThread.sleep(1000);
+      sleepUninterruptibly(1, TimeUnit.SECONDS);
       // don't need the regular tablet server
       cluster.killProcess(ServerType.TABLET_SERVER, cluster.getProcesses().get(ServerType.TABLET_SERVER).iterator().next());
-      UtilWaitThread.sleep(1000);
+      sleepUninterruptibly(1, TimeUnit.SECONDS);
       c.tableOperations().create("test_ingest");
       assertEquals(1, c.instanceOperations().getTabletServers().size());
       int rows = 100 * 1000;
       ingest = cluster.exec(TestIngest.class, "-u", "root", "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-p", ROOT_PASSWORD, "--rows", rows
           + "");
-      UtilWaitThread.sleep(500);
+      sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
 
       // block I/O with some side-channel trickiness
       File trickFile = new File(trickFilename);
       try {
         assertTrue(trickFile.createNewFile());
-        UtilWaitThread.sleep(seconds * 1000);
+        sleepUninterruptibly(seconds, TimeUnit.SECONDS);
       } finally {
         if (!trickFile.delete()) {
           log.error("Couldn't delete " + trickFile);
@@ -168,7 +170,7 @@ public class HalfDeadTServerIT extends ConfigurableMacBase {
         vopts.setPrincipal("root");
         VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
       } else {
-        UtilWaitThread.sleep(5 * 1000);
+        sleepUninterruptibly(5, TimeUnit.SECONDS);
         tserver.waitFor();
         t.join();
         tserver = null;

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
index 72b51eb..34d11fc 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/LargeRowIT.java
@@ -22,6 +22,7 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Random;
 import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
@@ -33,7 +34,6 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.accumulo.minicluster.MemoryUnit;
 import org.apache.accumulo.minicluster.ServerType;
@@ -48,6 +48,8 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class LargeRowIT extends AccumuloClusterHarness {
   private static final Logger log = LoggerFactory.getLogger(LargeRowIT.class);
 
@@ -117,7 +119,7 @@ public class LargeRowIT extends AccumuloClusterHarness {
     c.tableOperations().create(REG_TABLE_NAME);
     c.tableOperations().create(PRE_SPLIT_TABLE_NAME);
     c.tableOperations().setProperty(PRE_SPLIT_TABLE_NAME, Property.TABLE_MAX_END_ROW_SIZE.getKey(), "256K");
-    UtilWaitThread.sleep(3 * 1000);
+    sleepUninterruptibly(3, TimeUnit.SECONDS);
     c.tableOperations().addSplits(PRE_SPLIT_TABLE_NAME, splitPoints);
     test1(c);
     test2(c);
@@ -129,7 +131,7 @@ public class LargeRowIT extends AccumuloClusterHarness {
 
     c.tableOperations().setProperty(REG_TABLE_NAME, Property.TABLE_SPLIT_THRESHOLD.getKey(), "" + SPLIT_THRESH);
 
-    UtilWaitThread.sleep(timeoutFactor * 12000);
+    sleepUninterruptibly(timeoutFactor * 12, TimeUnit.SECONDS);
     log.info("checking splits");
     FunctionalTestUtils.checkSplits(c, REG_TABLE_NAME, NUM_PRE_SPLITS / 2, NUM_PRE_SPLITS * 4);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java b/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
index 9455456..aba0a24 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/MetadataIT.java
@@ -25,6 +25,7 @@ import java.util.Map.Entry;
 import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchScanner;
 import org.apache.accumulo.core.client.Connector;
@@ -36,7 +37,6 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
@@ -45,6 +45,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import com.google.common.collect.Iterators;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class MetadataIT extends AccumuloClusterHarness {
 
@@ -111,7 +112,7 @@ public class MetadataIT extends AccumuloClusterHarness {
     Scanner s = c.createScanner(RootTable.NAME, Authorizations.EMPTY);
     s.setRange(MetadataSchema.DeletesSection.getRange());
     while (Iterators.size(s.iterator()) == 0) {
-      UtilWaitThread.sleep(100);
+      sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
     }
     assertEquals(0, c.tableOperations().listSplits(MetadataTable.NAME).size());
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java b/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
index 977a659..3e8b421 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/MetadataMaxFilesIT.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertEquals;
 import java.util.Map.Entry;
 import java.util.SortedSet;
 import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.impl.ClientContext;
@@ -35,7 +36,6 @@ import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.trace.Tracer;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.server.util.Admin;
 import org.apache.hadoop.conf.Configuration;
@@ -43,6 +43,8 @@ import org.apache.hadoop.fs.RawLocalFileSystem;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class MetadataMaxFilesIT extends ConfigurableMacBase {
 
   @Override
@@ -67,7 +69,7 @@ public class MetadataMaxFilesIT extends ConfigurableMacBase {
     }
     c.tableOperations().setProperty(MetadataTable.NAME, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10000");
     // propagation time
-    UtilWaitThread.sleep(5 * 1000);
+    sleepUninterruptibly(5, TimeUnit.SECONDS);
     for (int i = 0; i < 5; i++) {
       String tableName = "table" + i;
       log.info("Creating " + tableName);
@@ -109,7 +111,7 @@ public class MetadataMaxFilesIT extends ConfigurableMacBase {
       log.info("Online tablets " + tablets);
       if (tablets == 5005)
         break;
-      UtilWaitThread.sleep(1000);
+      sleepUninterruptibly(1, TimeUnit.SECONDS);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/MetadataSplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/MetadataSplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/MetadataSplitIT.java
index ab2c791..58480bc 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/MetadataSplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/MetadataSplitIT.java
@@ -20,15 +20,17 @@ import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import java.util.Collections;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.metadata.MetadataTable;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class MetadataSplitIT extends ConfigurableMacBase {
 
   @Override
@@ -50,7 +52,7 @@ public class MetadataSplitIT extends ConfigurableMacBase {
       c.tableOperations().create("table" + i);
       c.tableOperations().flush(MetadataTable.NAME, null, null, true);
     }
-    UtilWaitThread.sleep(10 * 1000);
+    sleepUninterruptibly(10, TimeUnit.SECONDS);
     assertTrue(c.tableOperations().listSplits(MetadataTable.NAME).size() > 2);
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/RestartIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/RestartIT.java b/test/src/main/java/org/apache/accumulo/test/functional/RestartIT.java
index 39e9bed..d73bf3e 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/RestartIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/RestartIT.java
@@ -39,7 +39,6 @@ import org.apache.accumulo.core.client.security.tokens.KerberosToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.metadata.MetadataTable;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.fate.zookeeper.ZooLock;
@@ -59,6 +58,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Charsets;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class RestartIT extends AccumuloClusterHarness {
   private static final Logger log = LoggerFactory.getLogger(RestartIT.class);
@@ -190,7 +190,7 @@ public class RestartIT extends AccumuloClusterHarness {
     } while (null != masterLockData);
 
     cluster.start();
-    UtilWaitThread.sleep(5);
+    sleepUninterruptibly(5, TimeUnit.MILLISECONDS);
     control.stopAllServers(ServerType.MASTER);
 
     masterLockData = new byte[0];

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/RestartStressIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/RestartStressIT.java b/test/src/main/java/org/apache/accumulo/test/functional/RestartStressIT.java
index abfd5d8..f607d16 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/RestartStressIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/RestartStressIT.java
@@ -33,7 +33,6 @@ import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
 import org.apache.accumulo.core.client.security.tokens.KerberosToken;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
@@ -48,6 +47,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Charsets;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class RestartStressIT extends AccumuloClusterHarness {
   private static final Logger log = LoggerFactory.getLogger(RestartStressIT.class);
@@ -132,7 +132,7 @@ public class RestartStressIT extends AccumuloClusterHarness {
     });
 
     for (int i = 0; i < 2; i++) {
-      UtilWaitThread.sleep(10 * 1000);
+      sleepUninterruptibly(10, TimeUnit.SECONDS);
       control.stopAllServers(ServerType.TABLET_SERVER);
       control.startAllServers(ServerType.TABLET_SERVER);
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java
index 863ac78..7830939 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScanIdIT.java
@@ -33,6 +33,7 @@ import java.util.concurrent.ConcurrentHashMap;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.accumulo.core.client.AccumuloException;
@@ -52,13 +53,14 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.IteratorUtil;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.ColumnVisibility;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 /**
  * ACCUMULO-2641 Integration test. ACCUMULO-2641 Adds scan id to thrift protocol so that {@code org.apache.accumulo.core.client.admin.ActiveScan.getScanid()}
  * returns a unique scan id.
@@ -127,7 +129,7 @@ public class ScanIdIT extends AccumuloClusterHarness {
 
       if (resultsByWorker.size() < NUM_SCANNERS) {
         log.trace("Results reported {}", resultsByWorker.size());
-        UtilWaitThread.sleep(750);
+        sleepUninterruptibly(750, TimeUnit.MILLISECONDS);
       } else {
         // each worker has reported at least one result.
         testInProgress.set(false);
@@ -135,7 +137,7 @@ public class ScanIdIT extends AccumuloClusterHarness {
         log.debug("Final result count {}", resultsByWorker.size());
 
         // delay to allow scanners to react to end of test and cleanly close.
-        UtilWaitThread.sleep(1000);
+        sleepUninterruptibly(1, TimeUnit.SECONDS);
       }
 
     }
@@ -285,7 +287,7 @@ public class ScanIdIT extends AccumuloClusterHarness {
 
       conn.tableOperations().offline(tableName, true);
 
-      UtilWaitThread.sleep(2000);
+      sleepUninterruptibly(2, TimeUnit.SECONDS);
       conn.tableOperations().online(tableName, true);
 
       for (Text split : conn.tableOperations().listSplits(tableName)) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
index 0636056..78262ef 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ScanSessionTimeOutIT.java
@@ -21,6 +21,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.BatchWriterConfig;
@@ -33,7 +34,6 @@ import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.hadoop.conf.Configuration;
@@ -44,6 +44,8 @@ import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class ScanSessionTimeOutIT extends AccumuloClusterHarness {
   private static final Logger log = LoggerFactory.getLogger(ScanSessionTimeOutIT.class);
 
@@ -104,7 +106,7 @@ public class ScanSessionTimeOutIT extends AccumuloClusterHarness {
     verify(iter, 0, 200);
 
     // sleep three times the session timeout
-    UtilWaitThread.sleep(9000);
+    sleepUninterruptibly(9, TimeUnit.SECONDS);
 
     verify(iter, 200, 100000);
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/ServerSideErrorIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ServerSideErrorIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ServerSideErrorIT.java
index 02b65f4..334cf1c 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ServerSideErrorIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ServerSideErrorIT.java
@@ -18,6 +18,7 @@ package org.apache.accumulo.test.functional;
 
 import java.util.Collections;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchScanner;
 import org.apache.accumulo.core.client.BatchWriter;
@@ -32,11 +33,12 @@ import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.Combiner;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.hadoop.io.Text;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class ServerSideErrorIT extends AccumuloClusterHarness {
 
   @Override
@@ -101,7 +103,7 @@ public class ServerSideErrorIT extends AccumuloClusterHarness {
       to.removeProperty(tableName, e.getKey());
     }
 
-    UtilWaitThread.sleep(500);
+    sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
 
     // should be able to scan now
     scanner = c.createScanner(tableName, Authorizations.EMPTY);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
index 06399d8..9a2e42e 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ShutdownIT.java
@@ -21,10 +21,10 @@ import static org.junit.Assert.assertFalse;
 
 import java.io.IOException;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicReference;
 
 import org.apache.accumulo.core.client.Connector;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
 import org.apache.accumulo.server.util.Admin;
 import org.apache.accumulo.test.TestIngest;
@@ -32,6 +32,8 @@ import org.apache.accumulo.test.TestRandomDeletes;
 import org.apache.accumulo.test.VerifyIngest;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class ShutdownIT extends ConfigurableMacBase {
 
   @Override
@@ -43,7 +45,7 @@ public class ShutdownIT extends ConfigurableMacBase {
   public void shutdownDuringIngest() throws Exception {
     Process ingest = cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD,
         "--createTable");
-    UtilWaitThread.sleep(100);
+    sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
     assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
     ingest.destroy();
   }
@@ -54,7 +56,7 @@ public class ShutdownIT extends ConfigurableMacBase {
         cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable")
             .waitFor());
     Process verify = cluster.exec(VerifyIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD);
-    UtilWaitThread.sleep(100);
+    sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
     assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
     verify.destroy();
   }
@@ -65,7 +67,7 @@ public class ShutdownIT extends ConfigurableMacBase {
         cluster.exec(TestIngest.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD, "--createTable")
             .waitFor());
     Process deleter = cluster.exec(TestRandomDeletes.class, "-i", cluster.getInstanceName(), "-z", cluster.getZooKeepers(), "-u", "root", "-p", ROOT_PASSWORD);
-    UtilWaitThread.sleep(100);
+    sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
     assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
     deleter.destroy();
   }
@@ -89,7 +91,7 @@ public class ShutdownIT extends ConfigurableMacBase {
       }
     };
     async.start();
-    UtilWaitThread.sleep(100);
+    sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
     assertEquals(0, cluster.exec(Admin.class, "stopAll").waitFor());
     if (ref.get() != null)
       throw ref.get();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java b/test/src/main/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java
index 3fcbcfb..45cf06d 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SimpleBalancerFairnessIT.java
@@ -16,12 +16,14 @@
  */
 package org.apache.accumulo.test.functional;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 import java.util.ArrayList;
 import java.util.List;
 import java.util.TreeSet;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.cli.BatchWriterOpts;
 import org.apache.accumulo.core.client.Connector;
@@ -35,7 +37,6 @@ import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
 import org.apache.accumulo.core.master.thrift.TableInfo;
 import org.apache.accumulo.core.master.thrift.TabletServerStatus;
 import org.apache.accumulo.core.trace.Tracer;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.MemoryUnit;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
@@ -73,7 +74,7 @@ public class SimpleBalancerFairnessIT extends ConfigurableMacBase {
     opts.setPrincipal("root");
     TestIngest.ingest(c, opts, new BatchWriterOpts());
     c.tableOperations().flush("test_ingest", null, null, false);
-    UtilWaitThread.sleep(45 * 1000);
+    sleepUninterruptibly(45, TimeUnit.SECONDS);
     Credentials creds = new Credentials("root", new PasswordToken(ROOT_PASSWORD));
     ClientContext context = new ClientContext(c.getInstance(), creds, getClientConfig());
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/SlowConstraint.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SlowConstraint.java b/test/src/main/java/org/apache/accumulo/test/functional/SlowConstraint.java
index 187da35..3f8cc27 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SlowConstraint.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SlowConstraint.java
@@ -17,10 +17,12 @@
 package org.apache.accumulo.test.functional;
 
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.constraints.Constraint;
 import org.apache.accumulo.core.data.Mutation;
-import org.apache.accumulo.core.util.UtilWaitThread;
+
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 /**
  *
@@ -34,7 +36,7 @@ public class SlowConstraint implements Constraint {
 
   @Override
   public List<Short> check(Environment env, Mutation mutation) {
-    UtilWaitThread.sleep(20000);
+    sleepUninterruptibly(20, TimeUnit.SECONDS);
     return null;
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java b/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java
index f84a4d9..aeb0dff 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SlowIterator.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.test.functional;
 import java.io.IOException;
 import java.util.Collection;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.IteratorSetting;
 import org.apache.accumulo.core.data.ByteSequence;
@@ -28,7 +29,8 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.iterators.IteratorEnvironment;
 import org.apache.accumulo.core.iterators.SortedKeyValueIterator;
 import org.apache.accumulo.core.iterators.WrappingIterator;
-import org.apache.accumulo.core.util.UtilWaitThread;
+
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class SlowIterator extends WrappingIterator {
 
@@ -53,13 +55,13 @@ public class SlowIterator extends WrappingIterator {
 
   @Override
   public void next() throws IOException {
-    UtilWaitThread.sleep(sleepTime);
+    sleepUninterruptibly(sleepTime, TimeUnit.MILLISECONDS);
     super.next();
   }
 
   @Override
   public void seek(Range range, Collection<ByteSequence> columnFamilies, boolean inclusive) throws IOException {
-    UtilWaitThread.sleep(seekSleepTime);
+    sleepUninterruptibly(seekSleepTime, TimeUnit.MILLISECONDS);
     super.seek(range, columnFamilies, inclusive);
   }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java b/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
index 49cd2aa..11694fd 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/SplitIT.java
@@ -21,6 +21,7 @@ import static org.junit.Assert.assertTrue;
 
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.cluster.ClusterUser;
 import org.apache.accumulo.core.cli.BatchWriterOpts;
@@ -39,7 +40,6 @@ import org.apache.accumulo.core.data.impl.KeyExtent;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
@@ -56,6 +56,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Charsets;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class SplitIT extends AccumuloClusterHarness {
   private static final Logger log = LoggerFactory.getLogger(SplitIT.class);
@@ -146,7 +147,7 @@ public class SplitIT extends AccumuloClusterHarness {
     vopts.setTableName(table);
     VerifyIngest.verifyIngest(c, vopts, new ScannerOpts());
     while (c.tableOperations().listSplits(table).size() < 10) {
-      UtilWaitThread.sleep(15 * 1000);
+      sleepUninterruptibly(15, TimeUnit.SECONDS);
     }
     String id = c.tableOperations().tableIdMap().get(table);
     Scanner s = c.createScanner(MetadataTable.NAME, Authorizations.EMPTY);
@@ -185,9 +186,9 @@ public class SplitIT extends AccumuloClusterHarness {
     c.tableOperations().create(tableName);
     c.tableOperations().setProperty(tableName, Property.TABLE_SPLIT_THRESHOLD.getKey(), "10K");
     c.tableOperations().setProperty(tableName, Property.TABLE_FILE_COMPRESSION_TYPE.getKey(), "none");
-    UtilWaitThread.sleep(5 * 1000);
+    sleepUninterruptibly(5, TimeUnit.SECONDS);
     ReadWriteIT.interleaveTest(c, tableName);
-    UtilWaitThread.sleep(5 * 1000);
+    sleepUninterruptibly(5, TimeUnit.SECONDS);
     int numSplits = c.tableOperations().listSplits(tableName).size();
     while (numSplits <= 20) {
       log.info("Waiting for splits to happen");
@@ -213,7 +214,7 @@ public class SplitIT extends AccumuloClusterHarness {
     DeleteIT.deleteTest(c, getCluster(), getAdminPrincipal(), password, tableName, keytab);
     c.tableOperations().flush(tableName, null, null, true);
     for (int i = 0; i < 5; i++) {
-      UtilWaitThread.sleep(10 * 1000);
+      sleepUninterruptibly(10, TimeUnit.SECONDS);
       if (c.tableOperations().listSplits(tableName).size() > 20)
         break;
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/TimeoutIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/TimeoutIT.java b/test/src/main/java/org/apache/accumulo/test/functional/TimeoutIT.java
index ffadd22..d13c4af 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/TimeoutIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/TimeoutIT.java
@@ -34,10 +34,11 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Range;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.harness.AccumuloClusterHarness;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 /**
  *
  */
@@ -61,7 +62,7 @@ public class TimeoutIT extends AccumuloClusterHarness {
     conn.tableOperations().addConstraint(tableName, SlowConstraint.class.getName());
 
     // give constraint time to propagate through zookeeper
-    UtilWaitThread.sleep(1000);
+    sleepUninterruptibly(1, TimeUnit.SECONDS);
 
     BatchWriter bw = conn.createBatchWriter(tableName, new BatchWriterConfig().setTimeout(3, TimeUnit.SECONDS));
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java b/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
index f1d8344..ab3c662 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/WALSunnyDayIT.java
@@ -35,6 +35,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Random;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
@@ -48,7 +49,6 @@ import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.metadata.RootTable;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection;
 import org.apache.accumulo.core.metadata.schema.MetadataSchema.TabletsSection.TabletColumnFamily;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.master.state.SetGoalState;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterControl;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
@@ -64,6 +64,7 @@ import org.junit.Assert;
 import org.junit.Test;
 
 import com.google.common.collect.Iterators;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class WALSunnyDayIT extends ConfigurableMacBase {
 
@@ -117,7 +118,7 @@ public class WALSunnyDayIT extends ConfigurableMacBase {
     for (String table : new String[] {tableName, MetadataTable.NAME, RootTable.NAME}) {
       c.tableOperations().flush(table, null, null, true);
     }
-    UtilWaitThread.sleep(1000);
+    sleepUninterruptibly(1, TimeUnit.SECONDS);
     // rolled WAL is no longer in use, but needs to be GC'd
     Map<String,Boolean> walsAfterflush = getWals(c);
     assertEquals(walsAfterflush.toString(), 3, walsAfterflush.size());
@@ -125,7 +126,7 @@ public class WALSunnyDayIT extends ConfigurableMacBase {
 
     // let the GC run for a little bit
     control.start(GARBAGE_COLLECTOR);
-    UtilWaitThread.sleep(5 * 1000);
+    sleepUninterruptibly(5, TimeUnit.SECONDS);
     // make sure the unused WAL goes away
     Map<String,Boolean> walsAfterGC = getWals(c);
     assertEquals(walsAfterGC.toString(), 2, walsAfterGC.size());
@@ -139,7 +140,7 @@ public class WALSunnyDayIT extends ConfigurableMacBase {
     // wait for the metadata table to go back online
     getRecoveryMarkers(c);
     // allow a little time for the master to notice ASSIGNED_TO_DEAD_SERVER tablets
-    UtilWaitThread.sleep(5 * 1000);
+    sleepUninterruptibly(5, TimeUnit.SECONDS);
     Map<KeyExtent,List<String>> markers = getRecoveryMarkers(c);
     // log.debug("markers " + markers);
     assertEquals("one tablet should have markers", 1, markers.keySet().size());
@@ -154,7 +155,7 @@ public class WALSunnyDayIT extends ConfigurableMacBase {
     // log.debug("wals after " + walsAfterRestart);
     assertEquals("used WALs after restart should be 4", 4, countTrue(walsAfterRestart.values()));
     control.start(GARBAGE_COLLECTOR);
-    UtilWaitThread.sleep(5 * 1000);
+    sleepUninterruptibly(5, TimeUnit.SECONDS);
     Map<String,Boolean> walsAfterRestartAndGC = getWals(c);
     assertEquals("wals left should be 2", 2, walsAfterRestartAndGC.size());
     assertEquals("logs in use should be 2", 2, countTrue(walsAfterRestartAndGC.values()));

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
index da9f1d6..82f677b 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java
@@ -20,6 +20,7 @@ import static java.nio.charset.StandardCharsets.UTF_8;
 
 import java.util.HashMap;
 import java.util.Random;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.Constants;
 import org.apache.accumulo.core.client.impl.thrift.ThriftSecurityException;
@@ -32,7 +33,6 @@ import org.apache.accumulo.core.trace.Tracer;
 import org.apache.accumulo.core.trace.thrift.TInfo;
 import org.apache.accumulo.core.util.ServerServices;
 import org.apache.accumulo.core.util.ServerServices.Service;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockLossReason;
 import org.apache.accumulo.fate.zookeeper.ZooLock.LockWatcher;
@@ -51,6 +51,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.net.HostAndPort;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 /**
  * Tablet server that creates a lock in zookeeper, responds to one status request, and then hangs on subsequent requests. Exits with code zero if halted.
@@ -82,7 +83,7 @@ public class ZombieTServer {
           return result;
         }
       }
-      UtilWaitThread.sleep(Integer.MAX_VALUE);
+      sleepUninterruptibly(Integer.MAX_VALUE, TimeUnit.DAYS);
       return null;
     }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java b/test/src/main/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
index 19f90fe..b19ec2f 100644
--- a/test/src/main/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/functional/ZookeeperRestartIT.java
@@ -24,6 +24,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.Map.Entry;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
@@ -33,13 +34,14 @@ import org.apache.accumulo.core.data.Key;
 import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.minicluster.impl.ProcessReference;
 import org.apache.hadoop.conf.Configuration;
 import org.junit.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class ZookeeperRestartIT extends ConfigurableMacBase {
 
   @Override
@@ -69,7 +71,7 @@ public class ZookeeperRestartIT extends ConfigurableMacBase {
       cluster.killProcess(ServerType.ZOOKEEPER, proc);
 
     // give the servers time to react
-    UtilWaitThread.sleep(1000);
+    sleepUninterruptibly(1, TimeUnit.SECONDS);
 
     // start zookeeper back up
     cluster.start();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
index 006df21..ef05f37 100644
--- a/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
+++ b/test/src/main/java/org/apache/accumulo/test/performance/thrift/NullTserver.java
@@ -22,6 +22,7 @@ import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.client.ClientConfiguration;
@@ -59,7 +60,6 @@ import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Iface;
 import org.apache.accumulo.core.tabletserver.thrift.TabletClientService.Processor;
 import org.apache.accumulo.core.tabletserver.thrift.TabletStats;
 import org.apache.accumulo.core.trace.thrift.TInfo;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.client.ClientServiceHandler;
 import org.apache.accumulo.server.client.HdfsZooInstance;
@@ -77,6 +77,7 @@ import org.apache.thrift.TException;
 
 import com.beust.jcommander.Parameter;
 import com.google.common.net.HostAndPort;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 /**
  * The purpose of this class is to server as fake tserver that is a data sink like /dev/null. NullTserver modifies the metadata location entries for a table to
@@ -278,7 +279,7 @@ public class NullTserver {
     store.setLocations(assignments);
 
     while (true) {
-      UtilWaitThread.sleep(10000);
+      sleepUninterruptibly(10, TimeUnit.SECONDS);
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java b/test/src/main/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
index 745326e..7f61a08 100644
--- a/test/src/main/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/proxy/ProxyDurabilityIT.java
@@ -27,12 +27,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 import java.util.TreeMap;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.security.tokens.PasswordToken;
 import org.apache.accumulo.core.conf.Property;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloConfigImpl;
 import org.apache.accumulo.minicluster.impl.ProcessReference;
@@ -57,6 +57,7 @@ import org.junit.Test;
 
 import com.google.common.collect.Iterators;
 import com.google.common.net.HostAndPort;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class ProxyDurabilityIT extends ConfigurableMacBase {
 
@@ -93,7 +94,7 @@ public class ProxyDurabilityIT extends ConfigurableMacBase {
     int proxyPort = PortUtils.getRandomFreePort();
     final TServer proxyServer = Proxy.createProxyServer(HostAndPort.fromParts("localhost", proxyPort), protocol, props).server;
     while (!proxyServer.isServing())
-      UtilWaitThread.sleep(100);
+      sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
     Client client = new TestProxyClient("localhost", proxyPort, protocol).proxy();
     Map<String,String> properties = new TreeMap<String,String>();
     properties.put("password", ROOT_PASSWORD);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java b/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
index c5656d1..8c6811f 100644
--- a/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
+++ b/test/src/main/java/org/apache/accumulo/test/proxy/SimpleProxyBase.java
@@ -41,6 +41,7 @@ import java.util.Properties;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.cluster.ClusterUser;
 import org.apache.accumulo.core.client.ClientConfiguration;
@@ -60,7 +61,6 @@ import org.apache.accumulo.core.iterators.user.VersioningIterator;
 import org.apache.accumulo.core.metadata.MetadataTable;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.util.ByteBufferUtil;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.examples.simple.constraints.NumericValueConstraint;
 import org.apache.accumulo.harness.MiniClusterHarness;
 import org.apache.accumulo.harness.SharedMiniClusterBase;
@@ -126,6 +126,7 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
 import com.google.common.net.HostAndPort;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 /**
  * Call every method on the proxy and try to verify that it works.
@@ -227,7 +228,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
     proxyPort = PortUtils.getRandomFreePort();
     proxyServer = Proxy.createProxyServer(HostAndPort.fromParts(hostname, proxyPort), factory, props, clientConfig).server;
     while (!proxyServer.isServing())
-      UtilWaitThread.sleep(100);
+      sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
   }
 
   @AfterClass
@@ -934,7 +935,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
       cfg = client.getSystemConfiguration(creds);
       if ("500M".equals(cfg.get("table.split.threshold")))
         break;
-      UtilWaitThread.sleep(200);
+      sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
     }
     assertEquals("500M", cfg.get("table.split.threshold"));
 
@@ -944,7 +945,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
       cfg = client.getSystemConfiguration(creds);
       if (!"500M".equals(cfg.get("table.split.threshold")))
         break;
-      UtilWaitThread.sleep(200);
+      sleepUninterruptibly(200, TimeUnit.MILLISECONDS);
     }
     assertNotEquals("500M", cfg.get("table.split.threshold"));
   }
@@ -1032,7 +1033,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
 
         if (!scans.isEmpty())
           break;
-        UtilWaitThread.sleep(100);
+        sleepUninterruptibly(100, TimeUnit.MILLISECONDS);
       }
     }
     t.join();
@@ -1125,7 +1126,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
         if (!compactions.isEmpty())
           break;
       }
-      UtilWaitThread.sleep(10);
+      sleepUninterruptibly(10, TimeUnit.MILLISECONDS);
     }
     t.join();
 
@@ -1366,7 +1367,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
   public void testBatchWriter() throws Exception {
     client.addConstraint(creds, table, NumericValueConstraint.class.getName());
     // zookeeper propagation time
-    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
+    sleepUninterruptibly(ZOOKEEPER_PROPAGATION_TIME, TimeUnit.MILLISECONDS);
 
     WriterOptions writerOptions = new WriterOptions();
     writerOptions.setLatencyMs(10000);
@@ -1417,7 +1418,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
 
     assertScan(new String[][] {}, table);
 
-    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
+    sleepUninterruptibly(ZOOKEEPER_PROPAGATION_TIME, TimeUnit.MILLISECONDS);
 
     writerOptions = new WriterOptions();
     writerOptions.setLatencyMs(10000);
@@ -1494,7 +1495,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
     log.debug("Removing constraint from table");
     client.removeConstraint(creds, table, 2);
 
-    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
+    sleepUninterruptibly(ZOOKEEPER_PROPAGATION_TIME, TimeUnit.MILLISECONDS);
 
     constraints = client.listConstraints(creds, table);
     while (constraints.containsKey(NumericValueConstraint.class.getName())) {
@@ -1826,7 +1827,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterBase {
   public void testConditionalWriter() throws Exception {
     log.debug("Adding constraint {} to {}", table, NumericValueConstraint.class.getName());
     client.addConstraint(creds, table, NumericValueConstraint.class.getName());
-    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
+    sleepUninterruptibly(ZOOKEEPER_PROPAGATION_TIME, TimeUnit.MILLISECONDS);
 
     while (!client.listConstraints(creds, table).containsKey(NumericValueConstraint.class.getName())) {
       log.info("Failed to see constraint");

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/OfflineTable.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/OfflineTable.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/OfflineTable.java
index ba6389f..b5af0b7 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/OfflineTable.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/OfflineTable.java
@@ -19,14 +19,16 @@ package org.apache.accumulo.test.randomwalk.concurrent;
 import java.util.List;
 import java.util.Properties;
 import java.util.Random;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.TableNotFoundException;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.test.randomwalk.Environment;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class OfflineTable extends Test {
 
   @Override
@@ -43,7 +45,7 @@ public class OfflineTable extends Test {
     try {
       conn.tableOperations().offline(tableName, rand.nextBoolean());
       log.debug("Offlined " + tableName);
-      UtilWaitThread.sleep(rand.nextInt(200));
+      sleepUninterruptibly(rand.nextInt(200), TimeUnit.MILLISECONDS);
       conn.tableOperations().online(tableName, rand.nextBoolean());
       log.debug("Onlined " + tableName);
     } catch (TableNotFoundException tne) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Replication.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Replication.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Replication.java
index c1b2502..9f3e0aa 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Replication.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Replication.java
@@ -35,6 +35,7 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
@@ -47,13 +48,14 @@ import org.apache.accumulo.core.data.Mutation;
 import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.security.Authorizations;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.test.randomwalk.Environment;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 import org.apache.accumulo.tserver.replication.AccumuloReplicaSystem;
 import org.apache.hadoop.io.Text;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class Replication extends Test {
 
   final int ROWS = 1000;
@@ -84,7 +86,7 @@ public class Replication extends Test {
     for (int i = 0; i < 10; i++) {
       if (online)
         break;
-      UtilWaitThread.sleep(2000);
+      sleepUninterruptibly(2, TimeUnit.SECONDS);
       online = ReplicationTable.isOnline(c);
     }
     assertTrue("Replication table was not online", online);
@@ -105,7 +107,7 @@ public class Replication extends Test {
     tOps.setProperty(sourceTable, TABLE_REPLICATION_TARGET.getKey() + instName, destID);
 
     // zookeeper propagation wait
-    UtilWaitThread.sleep(5 * 1000);
+    sleepUninterruptibly(5, TimeUnit.SECONDS);
 
     // Maybe split the tables
     Random rand = new Random(System.currentTimeMillis());
@@ -148,7 +150,7 @@ public class Replication extends Test {
     }
 
     // wait a little while for replication to take place
-    UtilWaitThread.sleep(30 * 1000);
+    sleepUninterruptibly(30, TimeUnit.SECONDS);
 
     // check the data
     Scanner scanner = c.createScanner(destTable, Authorizations.EMPTY);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
index 6cc8312..eeaeea6 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/Shutdown.java
@@ -17,12 +17,12 @@
 package org.apache.accumulo.test.randomwalk.concurrent;
 
 import java.util.Properties;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.impl.MasterClient;
 import org.apache.accumulo.core.master.thrift.MasterClientService.Client;
 import org.apache.accumulo.core.master.thrift.MasterGoalState;
 import org.apache.accumulo.core.trace.Tracer;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.master.state.SetGoalState;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.client.HdfsZooInstance;
@@ -31,6 +31,8 @@ import org.apache.accumulo.test.randomwalk.Environment;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class Shutdown extends Test {
 
   @Override
@@ -39,7 +41,7 @@ public class Shutdown extends Test {
     SetGoalState.main(new String[] {MasterGoalState.CLEAN_STOP.name()});
 
     while (!env.getConnector().instanceOperations().getTabletServers().isEmpty()) {
-      UtilWaitThread.sleep(1000);
+      sleepUninterruptibly(1, TimeUnit.SECONDS);
     }
 
     while (true) {
@@ -51,11 +53,11 @@ public class Shutdown extends Test {
         // assume this is due to server shutdown
         break;
       }
-      UtilWaitThread.sleep(1000);
+      sleepUninterruptibly(1, TimeUnit.SECONDS);
     }
 
     log.info("servers stopped");
-    UtilWaitThread.sleep(10000);
+    sleepUninterruptibly(10, TimeUnit.SECONDS);
   }
 
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
index 8504fd1..cfc0053 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/concurrent/StartAll.java
@@ -17,13 +17,13 @@
 package org.apache.accumulo.test.randomwalk.concurrent;
 
 import java.util.Properties;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.impl.MasterClient;
 import org.apache.accumulo.core.master.thrift.MasterClientService.Client;
 import org.apache.accumulo.core.master.thrift.MasterGoalState;
 import org.apache.accumulo.core.master.thrift.MasterMonitorInfo;
 import org.apache.accumulo.core.trace.Tracer;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.master.state.SetGoalState;
 import org.apache.accumulo.server.AccumuloServerContext;
 import org.apache.accumulo.server.client.HdfsZooInstance;
@@ -32,6 +32,8 @@ import org.apache.accumulo.test.randomwalk.Environment;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class StartAll extends Test {
 
   @Override
@@ -48,7 +50,7 @@ public class StartAll extends Test {
         if (!masterStats.tServerInfo.isEmpty())
           break;
       } catch (Exception ex) {
-        UtilWaitThread.sleep(1000);
+        sleepUninterruptibly(1, TimeUnit.SECONDS);
       }
     }
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
index 095b5f7..5f696d0 100644
--- a/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
+++ b/test/src/main/java/org/apache/accumulo/test/randomwalk/shard/BulkInsert.java
@@ -25,6 +25,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 import java.util.Random;
+import java.util.concurrent.TimeUnit;
 
 import org.apache.accumulo.core.client.BatchWriter;
 import org.apache.accumulo.core.client.Connector;
@@ -36,7 +37,6 @@ import org.apache.accumulo.core.data.Value;
 import org.apache.accumulo.core.util.Base64;
 import org.apache.accumulo.core.util.CachedConfiguration;
 import org.apache.accumulo.core.util.TextUtil;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.test.randomwalk.Environment;
 import org.apache.accumulo.test.randomwalk.State;
 import org.apache.accumulo.test.randomwalk.Test;
@@ -48,6 +48,8 @@ import org.apache.hadoop.io.SequenceFile;
 import org.apache.hadoop.io.Text;
 import org.apache.hadoop.util.ToolRunner;
 
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
+
 public class BulkInsert extends Test {
 
   class SeqfileBatchWriter implements BatchWriter {
@@ -157,7 +159,7 @@ public class BulkInsert extends Test {
           else
             log.debug("Ignoring " + failure.getPath());
         }
-        UtilWaitThread.sleep(3000);
+        sleepUninterruptibly(3, TimeUnit.SECONDS);
       } else
         break;
     }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
index b6888db..e73a650 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/MultiInstanceReplicationIT.java
@@ -45,7 +45,6 @@ import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection;
 import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.TablePermission;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.master.replication.SequentialWorkAssigner;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
@@ -67,6 +66,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 /**
  * Replication tests which start at least two MAC instances and replicate data between them
@@ -668,7 +668,7 @@ public class MultiInstanceReplicationIT extends ConfigurableMacBase {
       // Wait until we fully replicated something
       boolean fullyReplicated = false;
       for (int i = 0; i < 10 && !fullyReplicated; i++) {
-        UtilWaitThread.sleep(2000);
+        sleepUninterruptibly(2, TimeUnit.SECONDS);
 
         Scanner s = ReplicationTable.getScanner(connMaster);
         WorkSection.limit(s);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
index e0a9121..b87bf04 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/ReplicationIT.java
@@ -31,6 +31,7 @@ import java.util.Map.Entry;
 import java.util.NoSuchElementException;
 import java.util.Set;
 import java.util.UUID;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicBoolean;
 
 import org.apache.accumulo.core.Constants;
@@ -70,7 +71,6 @@ import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.TablePermission;
 import org.apache.accumulo.core.tabletserver.log.LogEntry;
 import org.apache.accumulo.core.util.Pair;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.core.zookeeper.ZooUtil;
 import org.apache.accumulo.fate.zookeeper.ZooCache;
 import org.apache.accumulo.fate.zookeeper.ZooCacheFactory;
@@ -106,6 +106,7 @@ import com.google.common.collect.Iterables;
 import com.google.common.collect.Iterators;
 import com.google.common.collect.Multimap;
 import com.google.common.collect.Sets;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 import com.google.protobuf.TextFormat;
 
 /**
@@ -296,7 +297,7 @@ public class ReplicationIT extends ConfigurableMacBase {
     int attempts = 10;
     do {
       if (!online) {
-        UtilWaitThread.sleep(2000);
+        sleepUninterruptibly(2, TimeUnit.SECONDS);
         online = ReplicationTable.isOnline(conn);
         attempts--;
       }
@@ -427,7 +428,7 @@ public class ReplicationIT extends ConfigurableMacBase {
     int attempts = 10;
     do {
       if (!online) {
-        UtilWaitThread.sleep(5000);
+        sleepUninterruptibly(5, TimeUnit.SECONDS);
         online = ReplicationTable.isOnline(conn);
         attempts--;
       }
@@ -745,7 +746,7 @@ public class ReplicationIT extends ConfigurableMacBase {
     conn.tableOperations().flush(table, null, null, true);
 
     while (!ReplicationTable.isOnline(conn)) {
-      UtilWaitThread.sleep(2000);
+      sleepUninterruptibly(2, TimeUnit.SECONDS);
     }
 
     for (int i = 0; i < 10; i++) {
@@ -832,7 +833,7 @@ public class ReplicationIT extends ConfigurableMacBase {
         if (attempts <= 0) {
           throw e;
         }
-        UtilWaitThread.sleep(2000);
+        sleepUninterruptibly(2, TimeUnit.SECONDS);
       }
     }
 
@@ -844,7 +845,7 @@ public class ReplicationIT extends ConfigurableMacBase {
     attempts = 10;
     do {
       if (!online) {
-        UtilWaitThread.sleep(2000);
+        sleepUninterruptibly(2, TimeUnit.SECONDS);
         online = ReplicationTable.isOnline(conn);
         attempts--;
       }
@@ -853,7 +854,7 @@ public class ReplicationIT extends ConfigurableMacBase {
 
     // ACCUMULO-2743 The Observer in the tserver has to be made aware of the change to get the combiner (made by the master)
     for (int i = 0; i < 10 && !conn.tableOperations().listIterators(ReplicationTable.NAME).keySet().contains(ReplicationTable.COMBINER_NAME); i++) {
-      UtilWaitThread.sleep(2000);
+      sleepUninterruptibly(2, TimeUnit.SECONDS);
     }
 
     Assert.assertTrue("Combiner was never set on replication table",
@@ -992,7 +993,7 @@ public class ReplicationIT extends ConfigurableMacBase {
         if (attempts <= 0) {
           throw e;
         }
-        UtilWaitThread.sleep(500);
+        sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
       }
     }
 
@@ -1008,7 +1009,7 @@ public class ReplicationIT extends ConfigurableMacBase {
     attempts = 5;
     do {
       if (!online) {
-        UtilWaitThread.sleep(500);
+        sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
         online = ReplicationTable.isOnline(conn);
         attempts--;
       }
@@ -1163,7 +1164,7 @@ public class ReplicationIT extends ConfigurableMacBase {
           break;
         }
 
-        UtilWaitThread.sleep(2000);
+        sleepUninterruptibly(2, TimeUnit.SECONDS);
       }
 
       if (!allClosed) {
@@ -1198,7 +1199,7 @@ public class ReplicationIT extends ConfigurableMacBase {
           break;
         }
 
-        UtilWaitThread.sleep(3000);
+        sleepUninterruptibly(3, TimeUnit.SECONDS);
       }
 
       if (!allClosed) {
@@ -1248,7 +1249,7 @@ public class ReplicationIT extends ConfigurableMacBase {
         if (attempts <= 0) {
           throw e;
         }
-        UtilWaitThread.sleep(500);
+        sleepUninterruptibly(500, TimeUnit.MILLISECONDS);
       }
     }
 
@@ -1264,7 +1265,7 @@ public class ReplicationIT extends ConfigurableMacBase {
     attempts = 10;
     do {
       if (!online) {
-        UtilWaitThread.sleep(1000);
+        sleepUninterruptibly(1, TimeUnit.SECONDS);
         online = ReplicationTable.isOnline(conn);
         attempts--;
       }
@@ -1359,7 +1360,7 @@ public class ReplicationIT extends ConfigurableMacBase {
     cluster.getClusterControl().start(ServerType.TABLET_SERVER);
 
     log.info("Waiting to read tables");
-    UtilWaitThread.sleep(2 * 3 * 1000);
+    sleepUninterruptibly(2 * 3, TimeUnit.SECONDS);
 
     // Make sure we can read all the tables (recovery complete)
     for (String table : new String[] {MetadataTable.NAME, table1}) {

http://git-wip-us.apache.org/repos/asf/accumulo/blob/7ec6291a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
index 88224b5..7650dd5 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/UnorderedWorkAssignerReplicationIT.java
@@ -45,7 +45,6 @@ import org.apache.accumulo.core.replication.ReplicationSchema.WorkSection;
 import org.apache.accumulo.core.replication.ReplicationTable;
 import org.apache.accumulo.core.security.Authorizations;
 import org.apache.accumulo.core.security.TablePermission;
-import org.apache.accumulo.core.util.UtilWaitThread;
 import org.apache.accumulo.master.replication.UnorderedWorkAssigner;
 import org.apache.accumulo.minicluster.ServerType;
 import org.apache.accumulo.minicluster.impl.MiniAccumuloClusterImpl;
@@ -67,6 +66,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
+import static com.google.common.util.concurrent.Uninterruptibles.sleepUninterruptibly;
 
 public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
   private static final Logger log = LoggerFactory.getLogger(UnorderedWorkAssignerReplicationIT.class);
@@ -204,7 +204,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
       connMaster.tableOperations().setProperty(masterTable, Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId);
 
       // Wait for zookeeper updates (configuration) to propagate
-      UtilWaitThread.sleep(3 * 1000);
+      sleepUninterruptibly(3, TimeUnit.SECONDS);
 
       // Write some data to table1
       BatchWriter bw = connMaster.createBatchWriter(masterTable, new BatchWriterConfig());
@@ -368,7 +368,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
       connMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
 
       // Wait for zookeeper updates (configuration) to propogate
-      UtilWaitThread.sleep(3 * 1000);
+      sleepUninterruptibly(3, TimeUnit.SECONDS);
 
       // Write some data to table1
       BatchWriter bw = connMaster.createBatchWriter(masterTable1, new BatchWriterConfig());
@@ -632,7 +632,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
       connMaster.tableOperations().setProperty(masterTable2, Property.TABLE_REPLICATION_TARGET.getKey() + peerClusterName, peerTableId2);
 
       // Wait for zookeeper updates (configuration) to propagate
-      UtilWaitThread.sleep(3 * 1000);
+      sleepUninterruptibly(3, TimeUnit.SECONDS);
 
       // Write some data to table1
       BatchWriter bw = connMaster.createBatchWriter(masterTable1, new BatchWriterConfig());
@@ -675,7 +675,7 @@ public class UnorderedWorkAssignerReplicationIT extends ConfigurableMacBase {
       // Wait until we fully replicated something
       boolean fullyReplicated = false;
       for (int i = 0; i < 10 && !fullyReplicated; i++) {
-        UtilWaitThread.sleep(timeoutFactor * 2000);
+        sleepUninterruptibly(timeoutFactor * 2, TimeUnit.SECONDS);
 
         Scanner s = ReplicationTable.getScanner(connMaster);
         WorkSection.limit(s);


Mime
View raw message