You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by el...@apache.org on 2015/05/13 22:30:51 UTC

[2/5] accumulo git commit: ACCUMULO-3812 Lots of cleanup to the proxy ITs

ACCUMULO-3812 Lots of cleanup to the proxy ITs

Single MAC and ProxyServer for the scope of the test.
Break down huge test cases into manageable units. Lets
us also reduce the overall timeout of the tests.


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

Branch: refs/heads/master
Commit: d81ef2241bf0aeb9f0216bdf4c8cfe65a3638b09
Parents: 4362929
Author: Josh Elser <el...@apache.org>
Authored: Wed May 13 16:24:32 2015 -0400
Committer: Josh Elser <el...@apache.org>
Committed: Wed May 13 16:24:32 2015 -0400

----------------------------------------------------------------------
 .../apache/accumulo/proxy/SimpleProxyBase.java  | 1201 +++++++++++-------
 .../apache/accumulo/proxy/TBinaryProxyIT.java   |   12 +-
 .../apache/accumulo/proxy/TCompactProxyIT.java  |   11 +-
 .../accumulo/proxy/TJsonProtocolProxyIT.java    |   12 +-
 .../apache/accumulo/proxy/TTupleProxyIT.java    |   12 +-
 5 files changed, 746 insertions(+), 502 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/d81ef224/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
index e221081..eb7d661 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/SimpleProxyBase.java
@@ -19,6 +19,7 @@ package org.apache.accumulo.proxy;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
@@ -101,12 +102,16 @@ import org.apache.hadoop.fs.FileSystem;
 import org.apache.hadoop.fs.FileUtil;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.io.Text;
+import org.apache.thrift.TApplicationException;
 import org.apache.thrift.TException;
 import org.apache.thrift.protocol.TProtocolFactory;
 import org.apache.thrift.server.TServer;
 import org.junit.After;
+import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.Test;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.collect.Iterators;
 import com.google.common.net.HostAndPort;
@@ -115,26 +120,34 @@ import com.google.common.net.HostAndPort;
  * Call every method on the proxy and try to verify that it works.
  */
 public abstract class SimpleProxyBase extends SharedMiniClusterIT {
+  private static final Logger log = LoggerFactory.getLogger(SimpleProxyBase.class);
 
   @Override
   protected int defaultTimeoutSeconds() {
-    return 10 * 60;
+    return 60;
   }
 
   private static final long ZOOKEEPER_PROPAGATION_TIME = 10 * 1000;
-  private TServer proxyServer;
-  private int proxyPort;
-  private org.apache.accumulo.proxy.thrift.AccumuloProxy.Client client;
+  private static TServer proxyServer;
+  private static int proxyPort;
+  private static org.apache.accumulo.proxy.thrift.AccumuloProxy.Client client;
 
-  private Map<String,String> properties = new HashMap<>();
-  private ByteBuffer creds = null;
+  private static Map<String,String> properties = new HashMap<>();
+  private static ByteBuffer creds = null;
 
-  private void waitForAccumulo(Connector c) throws Exception {
+  // Implementations can set this
+  static TProtocolFactory factory = null;
+
+  private static void waitForAccumulo(Connector c) throws Exception {
     Iterators.size(c.createScanner(MetadataTable.NAME, Authorizations.EMPTY).iterator());
   }
 
-  @Before
-  public void setUpProxy() throws Exception {
+  /**
+   * Does the actual test setup, invoked by the concrete test class
+   */
+  public static void setUpProxy() throws Exception {
+    assertNotNull("Implementations must initialize the TProtocolFactory", factory);
+
     Connector c = SharedMiniClusterIT.getConnector();
     Instance inst = c.getInstance();
     waitForAccumulo(c);
@@ -152,7 +165,6 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     properties.put("clientConfigurationFile", emptyFile.toString());
 
     proxyPort = PortUtils.getRandomFreePort();
-    TProtocolFactory factory = getProtocol();
     proxyServer = Proxy.createProxyServer(HostAndPort.fromParts("localhost", proxyPort), factory, props).server;
     while (!proxyServer.isServing())
       UtilWaitThread.sleep(100);
@@ -160,292 +172,374 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     creds = client.login("root", properties);
   }
 
-  @After
-  public void tearDownProxy() throws Exception {
+  @AfterClass
+  public static void tearDownProxy() throws Exception {
     if (null != proxyServer) {
       proxyServer.stop();
     }
   }
 
-  public abstract TProtocolFactory getProtocol();
+  final IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "200"));
+  String table;
+  ByteBuffer badLogin;
 
-  @Test
-  public void security() throws Exception {
+  @Before
+  public void setup() throws Exception {
+    // Create 'user'
     client.createLocalUser(creds, "user", s2bb(SharedMiniClusterIT.getRootPassword()));
-    ByteBuffer badLogin = client.login("user", properties);
+    // Log in as 'user'
+    badLogin = client.login("user", properties);
+    // Drop 'user', invalidating the credentials
     client.dropLocalUser(creds, "user");
-    final String table = getUniqueNames(1)[0];
-    client.createTable(creds, table, false, TimeType.MILLIS);
 
-    final IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "200"));
+    // Create a general table to be used
+    table = getUniqueNames(1)[0];
+    client.createTable(creds, table, true, TimeType.MILLIS);
+  }
 
-    try {
-      client.addConstraint(badLogin, table, NumericValueConstraint.class.getName());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.addSplits(badLogin, table, Collections.singleton(s2bb("1")));
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.clearLocatorCache(badLogin, table);
-      fail("exception not thrown");
-    } catch (TException ex) {}
-    try {
-      client.compactTable(badLogin, table, null, null, null, true, false, null);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.cancelCompaction(badLogin, table);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.createTable(badLogin, table, false, TimeType.MILLIS);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.deleteTable(badLogin, table);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.deleteRows(badLogin, table, null, null);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.tableExists(badLogin, table);
-      fail("exception not thrown");
-    } catch (TException ex) {}
-    try {
-      client.flushTable(badLogin, table, null, null, false);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getLocalityGroups(badLogin, table);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getMaxRow(badLogin, table, Collections.<ByteBuffer> emptySet(), null, false, null, false);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getTableProperties(badLogin, table);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.listSplits(badLogin, table, 10000);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.listTables(badLogin);
-      fail("exception not thrown");
-    } catch (TException ex) {}
-    try {
-      client.listConstraints(badLogin, table);
-      fail("exception not thrown");
-    } catch (TException ex) {}
-    try {
-      client.mergeTablets(badLogin, table, null, null);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.offlineTable(badLogin, table, false);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.onlineTable(badLogin, table, false);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.removeConstraint(badLogin, table, 0);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.removeTableProperty(badLogin, table, Property.TABLE_FILE_MAX.getKey());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.renameTable(badLogin, table, "someTableName");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      Map<String,Set<String>> groups = new HashMap<String,Set<String>>();
-      groups.put("group1", Collections.singleton("cf1"));
-      groups.put("group2", Collections.singleton("cf2"));
-      client.setLocalityGroups(badLogin, table, groups);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.setTableProperty(badLogin, table, Property.TABLE_FILE_MAX.getKey(), "0");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.tableIdMap(badLogin);
-      fail("exception not thrown");
-    } catch (TException ex) {}
-    try {
-      client.getSiteConfiguration(badLogin);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getSystemConfiguration(badLogin);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getTabletServers(badLogin);
-      fail("exception not thrown");
-    } catch (TException ex) {}
-    try {
-      client.getActiveScans(badLogin, "fake");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getActiveCompactions(badLogin, "fakse");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.removeProperty(badLogin, "table.split.threshold");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.setProperty(badLogin, "table.split.threshold", "500M");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.testClassLoad(badLogin, DevNull.class.getName(), SortedKeyValueIterator.class.getName());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.authenticateUser(badLogin, "root", s2pp(SharedMiniClusterIT.getRootPassword()));
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      HashSet<ByteBuffer> auths = new HashSet<ByteBuffer>(Arrays.asList(s2bb("A"), s2bb("B")));
-      client.changeUserAuthorizations(badLogin, "stooge", auths);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.changeLocalUserPassword(badLogin, "stooge", s2bb(""));
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.createLocalUser(badLogin, "stooge", s2bb("password"));
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.dropLocalUser(badLogin, "stooge");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getUserAuthorizations(badLogin, "stooge");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.grantSystemPermission(badLogin, "stooge", SystemPermission.CREATE_TABLE);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.grantTablePermission(badLogin, "root", table, TablePermission.WRITE);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.hasSystemPermission(badLogin, "stooge", SystemPermission.CREATE_TABLE);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.hasTablePermission(badLogin, "root", table, TablePermission.WRITE);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.listLocalUsers(badLogin);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.revokeSystemPermission(badLogin, "stooge", SystemPermission.CREATE_TABLE);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.revokeTablePermission(badLogin, "root", table, TablePermission.ALTER_TABLE);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.createScanner(badLogin, table, new ScanOptions());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.createBatchScanner(badLogin, table, new BatchScanOptions());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.updateAndFlush(badLogin, table, new HashMap<ByteBuffer,List<ColumnUpdate>>());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.createWriter(badLogin, table, new WriterOptions());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.attachIterator(badLogin, "slow", setting, EnumSet.allOf(IteratorScope.class));
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.checkIteratorConflicts(badLogin, table, setting, EnumSet.allOf(IteratorScope.class));
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      final String TABLE_TEST = getUniqueNames(1)[0];
-      client.cloneTable(badLogin, table, TABLE_TEST, false, null, null);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.exportTable(badLogin, table, "/tmp");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.importTable(badLogin, "testify", "/tmp");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.getIteratorSetting(badLogin, table, "foo", IteratorScope.SCAN);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.listIterators(badLogin, table);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.removeIterator(badLogin, table, "name", EnumSet.allOf(IteratorScope.class));
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.splitRangeByTablets(badLogin, table, client.getRowRange(ByteBuffer.wrap("row".getBytes())), 10);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      MiniAccumuloClusterImpl cluster = SharedMiniClusterIT.getCluster();
-      Path base = cluster.getTemporaryPath();
-      Path importDir = new Path(base, "importDir");
-      Path failuresDir = new Path(base, "failuresDir");
-      assertTrue(cluster.getFileSystem().mkdirs(importDir));
-      assertTrue(cluster.getFileSystem().mkdirs(failuresDir));
-      client.importDirectory(badLogin, table, importDir.toString(), failuresDir.toString(), true);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.pingTabletServer(badLogin, "fake");
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.login("badUser", properties);
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.testTableClassLoad(badLogin, table, VersioningIterator.class.getName(), SortedKeyValueIterator.class.getName());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
-    try {
-      client.createConditionalWriter(badLogin, table, new ConditionalWriterOptions());
-      fail("exception not thrown");
-    } catch (AccumuloSecurityException ex) {}
+  @After
+  public void teardown() throws Exception {
+    if (null != table) {
+      try {
+        client.deleteTable(creds, table);
+      } catch (Exception e) {
+        log.warn("Failed to delete test table", e);
+      }
+    }
+  }
+
+  /*
+   * Set a lower timeout for tests that should fail fast
+   */
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void addConstraintLoginFailure() throws Exception {
+    client.addConstraint(badLogin, table, NumericValueConstraint.class.getName());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void addSplitsLoginFailure() throws Exception {
+    client.addSplits(badLogin, table, Collections.singleton(s2bb("1")));
+  }
+
+  @Test(expected = TApplicationException.class, timeout = 5000)
+  public void clearLocatorCacheLoginFailure() throws Exception {
+    client.clearLocatorCache(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void compactTableLoginFailure() throws Exception {
+    client.compactTable(badLogin, table, null, null, null, true, false, null);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void cancelCompactionLoginFailure() throws Exception {
+    client.cancelCompaction(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void createTableLoginFailure() throws Exception {
+    client.createTable(badLogin, table, false, TimeType.MILLIS);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void deleteTableLoginFailure() throws Exception {
+    client.deleteTable(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void deleteRowsLoginFailure() throws Exception {
+    client.deleteRows(badLogin, table, null, null);
+  }
+
+  @Test(expected = TApplicationException.class, timeout = 5000)
+  public void tableExistsLoginFailure() throws Exception {
+    client.tableExists(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void flustTableLoginFailure() throws Exception {
+    client.flushTable(badLogin, table, null, null, false);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getLocalityGroupsLoginFailure() throws Exception {
+    client.getLocalityGroups(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getMaxRowLoginFailure() throws Exception {
+    client.getMaxRow(badLogin, table, Collections.<ByteBuffer> emptySet(), null, false, null, false);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getTablePropertiesLoginFailure() throws Exception {
+    client.getTableProperties(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void listSplitsLoginFailure() throws Exception {
+    client.listSplits(badLogin, table, 10000);
+  }
+
+  @Test(expected = TApplicationException.class, timeout = 5000)
+  public void listTablesLoginFailure() throws Exception {
+    client.listTables(badLogin);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void listConstraintsLoginFailure() throws Exception {
+    client.listConstraints(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void mergeTabletsLoginFailure() throws Exception {
+    client.mergeTablets(badLogin, table, null, null);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void offlineTableLoginFailure() throws Exception {
+    client.offlineTable(badLogin, table, false);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void onlineTableLoginFailure() throws Exception {
+    client.onlineTable(badLogin, table, false);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void removeConstraintLoginFailure() throws Exception {
+    client.removeConstraint(badLogin, table, 0);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void removeTablePropertyLoginFailure() throws Exception {
+    client.removeTableProperty(badLogin, table, Property.TABLE_FILE_MAX.getKey());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void renameTableLoginFailure() throws Exception {
+    client.renameTable(badLogin, table, "someTableName");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void setLocalityGroupsLoginFailure() throws Exception {
+    Map<String,Set<String>> groups = new HashMap<String,Set<String>>();
+    groups.put("group1", Collections.singleton("cf1"));
+    groups.put("group2", Collections.singleton("cf2"));
+    client.setLocalityGroups(badLogin, table, groups);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void setTablePropertyLoginFailure() throws Exception {
+    client.setTableProperty(badLogin, table, Property.TABLE_FILE_MAX.getKey(), "0");
+  }
+
+  @Test(expected = TException.class, timeout = 5000)
+  public void tableIdMapLoginFailure() throws Exception {
+    client.tableIdMap(badLogin);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getSiteConfigurationLoginFailure() throws Exception {
+    client.getSiteConfiguration(badLogin);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getSystemConfigurationLoginFailure() throws Exception {
+    client.getSystemConfiguration(badLogin);
+  }
+
+  @Test(expected = TException.class, timeout = 5000)
+  public void getTabletServersLoginFailure() throws Exception {
+    client.getTabletServers(badLogin);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getActiveScansLoginFailure() throws Exception {
+    client.getActiveScans(badLogin, "fake");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getActiveCompactionsLoginFailure() throws Exception {
+    client.getActiveCompactions(badLogin, "fakse");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void removePropertyLoginFailure() throws Exception {
+    client.removeProperty(badLogin, "table.split.threshold");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void setPropertyLoginFailure() throws Exception {
+    client.setProperty(badLogin, "table.split.threshold", "500M");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void testClassLoadLoginFailure() throws Exception {
+    client.testClassLoad(badLogin, DevNull.class.getName(), SortedKeyValueIterator.class.getName());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void authenticateUserLoginFailure() throws Exception {
+    client.authenticateUser(badLogin, "root", s2pp(SharedMiniClusterIT.getRootPassword()));
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void changeUserAuthorizationsLoginFailure() throws Exception {
+    HashSet<ByteBuffer> auths = new HashSet<ByteBuffer>(Arrays.asList(s2bb("A"), s2bb("B")));
+    client.changeUserAuthorizations(badLogin, "stooge", auths);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void changePasswordLoginFailure() throws Exception {
+    client.changeLocalUserPassword(badLogin, "stooge", s2bb(""));
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void createUserLoginFailure() throws Exception {
+    client.createLocalUser(badLogin, "stooge", s2bb("password"));
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void dropUserLoginFailure() throws Exception {
+    client.dropLocalUser(badLogin, "stooge");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getUserAuthorizationsLoginFailure() throws Exception {
+    client.getUserAuthorizations(badLogin, "stooge");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void grantSystemPermissionLoginFailure() throws Exception {
+    client.grantSystemPermission(badLogin, "stooge", SystemPermission.CREATE_TABLE);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void grantTablePermissionLoginFailure() throws Exception {
+    client.grantTablePermission(badLogin, "root", table, TablePermission.WRITE);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void hasSystemPermissionLoginFailure() throws Exception {
+    client.hasSystemPermission(badLogin, "stooge", SystemPermission.CREATE_TABLE);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void hasTablePermission() throws Exception {
+    client.hasTablePermission(badLogin, "root", table, TablePermission.WRITE);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void listLocalUsersLoginFailure() throws Exception {
+    client.listLocalUsers(badLogin);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void revokeSystemPermissionLoginFailure() throws Exception {
+    client.revokeSystemPermission(badLogin, "stooge", SystemPermission.CREATE_TABLE);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void revokeTablePermissionLoginFailure() throws Exception {
+    client.revokeTablePermission(badLogin, "root", table, TablePermission.ALTER_TABLE);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void createScannerLoginFailure() throws Exception {
+    client.createScanner(badLogin, table, new ScanOptions());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void createBatchScannerLoginFailure() throws Exception {
+    client.createBatchScanner(badLogin, table, new BatchScanOptions());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void updateAndFlushLoginFailure() throws Exception {
+    client.updateAndFlush(badLogin, table, new HashMap<ByteBuffer,List<ColumnUpdate>>());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void createWriterLoginFailure() throws Exception {
+    client.createWriter(badLogin, table, new WriterOptions());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void attachIteratorLoginFailure() throws Exception {
+    client.attachIterator(badLogin, "slow", setting, EnumSet.allOf(IteratorScope.class));
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void checkIteratorLoginFailure() throws Exception {
+    client.checkIteratorConflicts(badLogin, table, setting, EnumSet.allOf(IteratorScope.class));
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void cloneTableLoginFailure() throws Exception {
+    client.cloneTable(badLogin, table, table + "_clone", false, null, null);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void exportTableLoginFailure() throws Exception {
+    client.exportTable(badLogin, table, "/tmp");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void importTableLoginFailure() throws Exception {
+    client.importTable(badLogin, "testify", "/tmp");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void getIteratorSettingLoginFailure() throws Exception {
+    client.getIteratorSetting(badLogin, table, "foo", IteratorScope.SCAN);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void listIteratorsLoginFailure() throws Exception {
+    client.listIterators(badLogin, table);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void removeIteratorLoginFailure() throws Exception {
+    client.removeIterator(badLogin, table, "name", EnumSet.allOf(IteratorScope.class));
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void splitRangeByTabletsLoginFailure() throws Exception {
+    client.splitRangeByTablets(badLogin, table, client.getRowRange(ByteBuffer.wrap("row".getBytes())), 10);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void importDirectoryLoginFailure() throws Exception {
+    MiniAccumuloClusterImpl cluster = SharedMiniClusterIT.getCluster();
+    Path base = cluster.getTemporaryPath();
+    Path importDir = new Path(base, "importDir");
+    Path failuresDir = new Path(base, "failuresDir");
+    assertTrue(cluster.getFileSystem().mkdirs(importDir));
+    assertTrue(cluster.getFileSystem().mkdirs(failuresDir));
+    client.importDirectory(badLogin, table, importDir.toString(), failuresDir.toString(), true);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void pingTabletServerLoginFailure() throws Exception {
+    client.pingTabletServer(badLogin, "fake");
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void loginFailure() throws Exception {
+    client.login("badUser", properties);
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void testTableClassLoadLoginFailure() throws Exception {
+    client.testTableClassLoad(badLogin, table, VersioningIterator.class.getName(), SortedKeyValueIterator.class.getName());
+  }
+
+  @Test(expected = AccumuloSecurityException.class, timeout = 5000)
+  public void createConditionalWriterLoginFailure() throws Exception {
+    client.createConditionalWriter(badLogin, table, new ConditionalWriterOptions());
   }
 
   @Test
@@ -632,11 +726,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test
   public void testUnknownScanner() throws Exception {
-    final String TABLE_TEST = getUniqueNames(1)[0];
-
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-
-    String scanner = client.createScanner(creds, TABLE_TEST, null);
+    String scanner = client.createScanner(creds, table, null);
     assertFalse(client.hasNext(scanner));
     client.closeScanner(scanner);
 
@@ -670,11 +760,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test
   public void testUnknownWriter() throws Exception {
-    final String TABLE_TEST = getUniqueNames(1)[0];
-
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-
-    String writer = client.createWriter(creds, TABLE_TEST, null);
+    String writer = client.createWriter(creds, table, null);
     client.update(writer, mutation("row0", "cf", "cq", "value"));
     client.flush(writer);
     client.update(writer, mutation("row2", "cf", "cq", "value2"));
@@ -703,45 +789,32 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test
   public void testDelete() throws Exception {
-    final String TABLE_TEST = getUniqueNames(1)[0];
-
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-    client.updateAndFlush(creds, TABLE_TEST, mutation("row0", "cf", "cq", "value"));
+    client.updateAndFlush(creds, table, mutation("row0", "cf", "cq", "value"));
 
-    assertScan(new String[][] {{"row0", "cf", "cq", "value"}}, TABLE_TEST);
+    assertScan(new String[][] {{"row0", "cf", "cq", "value"}}, table);
 
     ColumnUpdate upd = new ColumnUpdate(s2bb("cf"), s2bb("cq"));
     upd.setDeleteCell(false);
     Map<ByteBuffer,List<ColumnUpdate>> notDelete = Collections.singletonMap(s2bb("row0"), Collections.singletonList(upd));
-    client.updateAndFlush(creds, TABLE_TEST, notDelete);
-    String scanner = client.createScanner(creds, TABLE_TEST, null);
+    client.updateAndFlush(creds, table, notDelete);
+    String scanner = client.createScanner(creds, table, null);
     ScanResult entries = client.nextK(scanner, 10);
     client.closeScanner(scanner);
     assertFalse(entries.more);
-    assertEquals(1, entries.results.size());
+    assertEquals("Results: " + entries.results, 1, entries.results.size());
 
     upd = new ColumnUpdate(s2bb("cf"), s2bb("cq"));
     upd.setDeleteCell(true);
     Map<ByteBuffer,List<ColumnUpdate>> delete = Collections.singletonMap(s2bb("row0"), Collections.singletonList(upd));
 
-    client.updateAndFlush(creds, TABLE_TEST, delete);
+    client.updateAndFlush(creds, table, delete);
 
-    assertScan(new String[][] {}, TABLE_TEST);
+    assertScan(new String[][] {}, table);
   }
 
   @Test
-  public void testInstanceOperations() throws Exception {
-    int tservers = 0;
-    for (String tserver : client.getTabletServers(creds)) {
-      client.pingTabletServer(creds, tserver);
-      tservers++;
-    }
-    assertTrue(tservers > 0);
-
-    // get something we know is in the site config
-    MiniAccumuloClusterImpl cluster = SharedMiniClusterIT.getCluster();
+  public void testSystemProperties() throws Exception {
     Map<String,String> cfg = client.getSiteConfiguration(creds);
-    assertTrue(cfg.get("instance.dfs.dir").startsWith(cluster.getConfig().getAccumuloDir().getAbsolutePath()));
 
     // set a property in zookeeper
     client.setProperty(creds, "table.split.threshold", "500M");
@@ -764,12 +837,40 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
       UtilWaitThread.sleep(200);
     }
     assertNotEquals("500M", cfg.get("table.split.threshold"));
+  }
+
+  @Test
+  public void pingTabletServers() throws Exception {
+    int tservers = 0;
+    for (String tserver : client.getTabletServers(creds)) {
+      client.pingTabletServer(creds, tserver);
+      tservers++;
+    }
+    assertTrue(tservers > 0);
+  }
+
+  @Test
+  public void testSiteConfiguration() throws Exception {
+    // get something we know is in the site config
+    MiniAccumuloClusterImpl cluster = SharedMiniClusterIT.getCluster();
+    Map<String,String> cfg = client.getSiteConfiguration(creds);
+    assertTrue(cfg.get("instance.dfs.dir").startsWith(cluster.getConfig().getAccumuloDir().getAbsolutePath()));
+  }
 
+  @Test
+  public void testClassLoad() throws Exception {
     // try to load some classes via the proxy
     assertTrue(client.testClassLoad(creds, DevNull.class.getName(), SortedKeyValueIterator.class.getName()));
     assertFalse(client.testClassLoad(creds, "foo.bar", SortedKeyValueIterator.class.getName()));
+  }
+
+  @Test
+  public void attachIteratorsWithScans() throws Exception {
+    if (client.tableExists(creds, "slow")) {
+      client.deleteTable(creds, "slow");
+    }
 
-    // create a table that's very slow, so we can look for scans/compactions
+    // create a table that's very slow, so we can look for scans
     client.createTable(creds, "slow", true, TimeType.MILLIS);
     IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "250"));
     client.attachIterator(creds, "slow", setting, EnumSet.allOf(IteratorScope.class));
@@ -785,7 +886,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
       public void run() {
         String scanner;
         try {
-          Client client2 = new TestProxyClient("localhost", proxyPort, getProtocol()).proxy();
+          Client client2 = new TestProxyClient("localhost", proxyPort, factory).proxy();
           scanner = client2.createScanner(creds, "slow", null);
           client2.nextK(scanner, 10);
           client2.closeScanner(scanner);
@@ -833,13 +934,32 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     }
 
     assertTrue("Could not find a scan against the 'slow' table", found);
+  }
+
+  @Test
+  public void attachIteratorWithCompactions() throws Exception {
+    if (client.tableExists(creds, "slow")) {
+      client.deleteTable(creds, "slow");
+    }
+
+    // create a table that's very slow, so we can look for compactions
+    client.createTable(creds, "slow", true, TimeType.MILLIS);
+    IteratorSetting setting = new IteratorSetting(100, "slow", SlowIterator.class.getName(), Collections.singletonMap("sleepTime", "250"));
+    client.attachIterator(creds, "slow", setting, EnumSet.allOf(IteratorScope.class));
+
+    // Should take 10 seconds to read every record
+    for (int i = 0; i < 40; i++) {
+      client.updateAndFlush(creds, "slow", mutation("row" + i, "cf", "cq", "value"));
+    }
+
+    Map<String,String> map = client.tableIdMap(creds);
 
     // start a compaction
-    t = new Thread() {
+    Thread t = new Thread() {
       @Override
       public void run() {
         try {
-          Client client2 = new TestProxyClient("localhost", proxyPort, getProtocol()).proxy();
+          Client client2 = new TestProxyClient("localhost", proxyPort, factory).proxy();
           client2.compactTable(creds, "slow", null, null, null, true, true, null);
         } catch (Exception e) {
           throw new RuntimeException(e);
@@ -850,6 +970,9 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
     final String desiredTableId = map.get("slow");
 
+    // Make sure we can find the slow table
+    assertNotNull(desiredTableId);
+
     // try to catch it in the act
     List<ActiveCompaction> compactions = new ArrayList<ActiveCompaction>();
     for (int i = 0; i < 100 && compactions.isEmpty(); i++) {
@@ -886,98 +1009,101 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
         return;
       }
     }
+
     fail("Expection to find running compaction for table 'slow' but did not find one");
   }
 
   @Test
-  public void testSecurityOperations() throws Exception {
-    final String TABLE_TEST = getUniqueNames(1)[0];
-
+  public void userAuthentication() throws Exception {
     // check password
     assertTrue(client.authenticateUser(creds, "root", s2pp(SharedMiniClusterIT.getRootPassword())));
     assertFalse(client.authenticateUser(creds, "root", s2pp("")));
+  }
 
+  @Test
+  public void userManagement() throws Exception {
+    String user = getUniqueNames(1)[0];
     // create a user
-    client.createLocalUser(creds, "stooge", s2bb("password"));
+    client.createLocalUser(creds, user, s2bb("password"));
     // change auths
     Set<String> users = client.listLocalUsers(creds);
-    assertEquals(new HashSet<String>(Arrays.asList("root", "stooge")), users);
+    Set<String> expectedUsers = new HashSet<String>(Arrays.asList("root", user));
+    assertTrue("Did not find all expected users: " + expectedUsers, users.containsAll(expectedUsers));
     HashSet<ByteBuffer> auths = new HashSet<ByteBuffer>(Arrays.asList(s2bb("A"), s2bb("B")));
-    client.changeUserAuthorizations(creds, "stooge", auths);
-    List<ByteBuffer> update = client.getUserAuthorizations(creds, "stooge");
+    client.changeUserAuthorizations(creds, user, auths);
+    List<ByteBuffer> update = client.getUserAuthorizations(creds, user);
     assertEquals(auths, new HashSet<ByteBuffer>(update));
 
     // change password
-    client.changeLocalUserPassword(creds, "stooge", s2bb(""));
-    assertTrue(client.authenticateUser(creds, "stooge", s2pp("")));
+    client.changeLocalUserPassword(creds, user, s2bb(""));
+    assertTrue(client.authenticateUser(creds, user, s2pp("")));
 
-    // check permission failure
-    @SuppressWarnings("serial")
-    ByteBuffer stooge = client.login("stooge", new TreeMap<String,String>() {
-      {
-        put("password", "");
-      }
-    });
+    // check login with new password
+    client.login(user, s2pp(""));
+  }
+
+  @Test
+  public void userPermissions() throws Exception {
+    String userName = getUniqueNames(1)[0];
+    // create a user
+    client.createLocalUser(creds, userName, s2bb("password"));
 
+    ByteBuffer user = client.login(userName, s2pp("password"));
+
+    // check permission failure
     try {
-      client.createTable(stooge, "fail", true, TimeType.MILLIS);
+      client.createTable(user, "fail", true, TimeType.MILLIS);
       fail("should not create the table");
     } catch (AccumuloSecurityException ex) {
       assertFalse(client.listTables(creds).contains("fail"));
     }
     // grant permissions and test
-    assertFalse(client.hasSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE));
-    client.grantSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE);
-    assertTrue(client.hasSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE));
-    client.createTable(stooge, "success", true, TimeType.MILLIS);
+    assertFalse(client.hasSystemPermission(creds, userName, SystemPermission.CREATE_TABLE));
+    client.grantSystemPermission(creds, userName, SystemPermission.CREATE_TABLE);
+    assertTrue(client.hasSystemPermission(creds, userName, SystemPermission.CREATE_TABLE));
+    client.createTable(user, "success", true, TimeType.MILLIS);
     client.listTables(creds).contains("succcess");
 
     // revoke permissions
-    client.revokeSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE);
-    assertFalse(client.hasSystemPermission(creds, "stooge", SystemPermission.CREATE_TABLE));
+    client.revokeSystemPermission(creds, userName, SystemPermission.CREATE_TABLE);
+    assertFalse(client.hasSystemPermission(creds, userName, SystemPermission.CREATE_TABLE));
     try {
-      client.createTable(stooge, "fail", true, TimeType.MILLIS);
+      client.createTable(user, "fail", true, TimeType.MILLIS);
       fail("should not create the table");
     } catch (AccumuloSecurityException ex) {
       assertFalse(client.listTables(creds).contains("fail"));
     }
-    // create a table to test table permissions
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
     // denied!
     try {
-      String scanner = client.createScanner(stooge, TABLE_TEST, null);
+      String scanner = client.createScanner(user, table, null);
       client.nextK(scanner, 100);
       fail("stooge should not read table test");
     } catch (AccumuloSecurityException ex) {}
     // grant
-    assertFalse(client.hasTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ));
-    client.grantTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ);
-    assertTrue(client.hasTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ));
-    String scanner = client.createScanner(stooge, TABLE_TEST, null);
+    assertFalse(client.hasTablePermission(creds, userName, table, TablePermission.READ));
+    client.grantTablePermission(creds, userName, table, TablePermission.READ);
+    assertTrue(client.hasTablePermission(creds, userName, table, TablePermission.READ));
+    String scanner = client.createScanner(user, table, null);
     client.nextK(scanner, 10);
     client.closeScanner(scanner);
     // revoke
-    client.revokeTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ);
-    assertFalse(client.hasTablePermission(creds, "stooge", TABLE_TEST, TablePermission.READ));
+    client.revokeTablePermission(creds, userName, table, TablePermission.READ);
+    assertFalse(client.hasTablePermission(creds, userName, table, TablePermission.READ));
     try {
-      scanner = client.createScanner(stooge, TABLE_TEST, null);
+      scanner = client.createScanner(user, table, null);
       client.nextK(scanner, 100);
       fail("stooge should not read table test");
     } catch (AccumuloSecurityException ex) {}
 
     // delete user
-    client.dropLocalUser(creds, "stooge");
-    users = client.listLocalUsers(creds);
-    assertEquals(1, users.size());
-
+    client.dropLocalUser(creds, userName);
+    Set<String> users = client.listLocalUsers(creds);
+    assertFalse("Should not see user after they are deleted", users.contains(userName));
   }
 
   @Test
   public void testBatchWriter() throws Exception {
-    final String TABLE_TEST = getUniqueNames(1)[0];
-
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
+    client.addConstraint(creds, table, NumericValueConstraint.class.getName());
     // zookeeper propagation time
     UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
 
@@ -987,7 +1113,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     writerOptions.setThreads(1);
     writerOptions.setTimeoutMs(100000);
 
-    String batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
+    String batchWriter = client.createWriter(creds, table, writerOptions);
     client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
     client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
     try {
@@ -999,9 +1125,9 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
       fail("constraint did not fire");
     } catch (MutationsRejectedException e) {}
 
-    client.removeConstraint(creds, TABLE_TEST, 2);
+    client.removeConstraint(creds, table, 2);
 
-    assertScan(new String[][] {}, TABLE_TEST);
+    assertScan(new String[][] {}, table);
 
     UtilWaitThread.sleep(2000);
 
@@ -1011,127 +1137,212 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     writerOptions.setThreads(1);
     writerOptions.setTimeoutMs(100000);
 
-    batchWriter = client.createWriter(creds, TABLE_TEST, writerOptions);
+    batchWriter = client.createWriter(creds, table, writerOptions);
 
     client.update(batchWriter, mutation("row1", "cf", "cq", "x"));
     client.flush(batchWriter);
     client.closeWriter(batchWriter);
 
-    assertScan(new String[][] {{"row1", "cf", "cq", "x"}}, TABLE_TEST);
+    assertScan(new String[][] {{"row1", "cf", "cq", "x"}}, table);
 
-    client.deleteTable(creds, TABLE_TEST);
+    client.deleteTable(creds, table);
   }
 
   @Test
-  public void testTableOperations() throws Exception {
-    String names[] = getUniqueNames(2);
-    final String TABLE_TEST = names[0];
-    final String TABLE_TEST2 = names[1];
+  public void testTableConstraints() throws Exception {
 
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
     // constraints
-    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
-    assertEquals(2, client.listConstraints(creds, TABLE_TEST).size());
+    client.addConstraint(creds, table, NumericValueConstraint.class.getName());
 
     // zookeeper propagation time
     UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
 
-    client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "123"));
+    assertEquals(2, client.listConstraints(creds, table).size());
+
+    // Write data that satisfies the constraint
+    client.updateAndFlush(creds, table, mutation("row1", "cf", "cq", "123"));
 
+    // Expect failure on data that fails the constraint
     while (true) {
       try {
-        client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "x"));
+        client.updateAndFlush(creds, table, mutation("row1", "cf", "cq", "x"));
         UtilWaitThread.sleep(1000);
       } catch (MutationsRejectedException ex) {
         break;
       }
     }
 
-    client.removeConstraint(creds, TABLE_TEST, 2);
+    client.removeConstraint(creds, table, 2);
 
-    UtilWaitThread.sleep(2000);
+    UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
 
-    assertEquals(1, client.listConstraints(creds, TABLE_TEST).size());
+    assertEquals(1, client.listConstraints(creds, table).size());
 
+    // Make sure we can write the data after we removed the constraint
     while (true) {
       try {
-        client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "x"));
+        client.updateAndFlush(creds, table, mutation("row1", "cf", "cq", "x"));
         break;
       } catch (MutationsRejectedException ex) {
         UtilWaitThread.sleep(1000);
       }
     }
-    assertScan(new String[][] {{"row1", "cf", "cq", "x"}}, TABLE_TEST);
-    // splits, merge
-    client.addSplits(creds, TABLE_TEST, new HashSet<ByteBuffer>(Arrays.asList(s2bb("a"), s2bb("m"), s2bb("z"))));
-    List<ByteBuffer> splits = client.listSplits(creds, TABLE_TEST, 1);
+
+    assertScan(new String[][] {{"row1", "cf", "cq", "x"}}, table);
+  }
+
+  @Test
+  public void tableMergesAndSplits() throws Exception {
+    // add some splits
+    client.addSplits(creds, table, new HashSet<ByteBuffer>(Arrays.asList(s2bb("a"), s2bb("m"), s2bb("z"))));
+    List<ByteBuffer> splits = client.listSplits(creds, table, 1);
     assertEquals(Arrays.asList(s2bb("m")), splits);
-    client.mergeTablets(creds, TABLE_TEST, null, s2bb("m"));
-    splits = client.listSplits(creds, TABLE_TEST, 10);
+
+    // Merge some of the splits away
+    client.mergeTablets(creds, table, null, s2bb("m"));
+    splits = client.listSplits(creds, table, 10);
     assertEquals(Arrays.asList(s2bb("m"), s2bb("z")), splits);
-    client.mergeTablets(creds, TABLE_TEST, null, null);
-    splits = client.listSplits(creds, TABLE_TEST, 10);
+
+    // Merge the entire table
+    client.mergeTablets(creds, table, null, null);
+    splits = client.listSplits(creds, table, 10);
     List<ByteBuffer> empty = Collections.emptyList();
+
+    // No splits after merge on whole table
     assertEquals(empty, splits);
+  }
+
+  @Test
+  public void iteratorFunctionality() throws Exception {
     // iterators
-    client.deleteTable(creds, TABLE_TEST);
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
     HashMap<String,String> options = new HashMap<String,String>();
     options.put("type", "STRING");
     options.put("columns", "cf");
-    IteratorSetting setting = new IteratorSetting(10, TABLE_TEST, SummingCombiner.class.getName(), options);
-    client.attachIterator(creds, TABLE_TEST, setting, EnumSet.allOf(IteratorScope.class));
+    IteratorSetting setting = new IteratorSetting(10, table, SummingCombiner.class.getName(), options);
+    client.attachIterator(creds, table, setting, EnumSet.allOf(IteratorScope.class));
     for (int i = 0; i < 10; i++) {
-      client.updateAndFlush(creds, TABLE_TEST, mutation("row1", "cf", "cq", "1"));
+      client.updateAndFlush(creds, table, mutation("row1", "cf", "cq", "1"));
     }
-    assertScan(new String[][] {{"row1", "cf", "cq", "10"}}, TABLE_TEST);
+    // 10 updates of "1" in the value w/ SummingCombiner should return value of "10"
+    assertScan(new String[][] {{"row1", "cf", "cq", "10"}}, table);
+
     try {
-      client.checkIteratorConflicts(creds, TABLE_TEST, setting, EnumSet.allOf(IteratorScope.class));
+      client.checkIteratorConflicts(creds, table, setting, EnumSet.allOf(IteratorScope.class));
       fail("checkIteratorConflicts did not throw an exception");
     } catch (Exception ex) {
-      System.out.println("Ignoring " + ex.toString());
+      // Expected
     }
-    client.deleteRows(creds, TABLE_TEST, null, null);
-    client.removeIterator(creds, TABLE_TEST, "test", EnumSet.allOf(IteratorScope.class));
+    client.deleteRows(creds, table, null, null);
+    client.removeIterator(creds, table, "test", EnumSet.allOf(IteratorScope.class));
     String expected[][] = new String[10][];
     for (int i = 0; i < 10; i++) {
-      client.updateAndFlush(creds, TABLE_TEST, mutation("row" + i, "cf", "cq", "" + i));
+      client.updateAndFlush(creds, table, mutation("row" + i, "cf", "cq", "" + i));
       expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
-      client.flushTable(creds, TABLE_TEST, null, null, true);
+      client.flushTable(creds, table, null, null, true);
     }
-    assertScan(expected, TABLE_TEST);
+    assertScan(expected, table);
+  }
+
+  @Test
+  public void cloneTable() throws Exception {
+    String TABLE_TEST2 = getUniqueNames(2)[1];
+
+    String expected[][] = new String[10][];
+    for (int i = 0; i < 10; i++) {
+      client.updateAndFlush(creds, table, mutation("row" + i, "cf", "cq", "" + i));
+      expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
+      client.flushTable(creds, table, null, null, true);
+    }
+    assertScan(expected, table);
+
     // clone
-    client.cloneTable(creds, TABLE_TEST, TABLE_TEST2, true, null, null);
+    client.cloneTable(creds, table, TABLE_TEST2, true, null, null);
     assertScan(expected, TABLE_TEST2);
     client.deleteTable(creds, TABLE_TEST2);
+  }
 
+  @Test
+  public void clearLocatorCache() throws Exception {
     // don't know how to test this, call it just for fun
-    client.clearLocatorCache(creds, TABLE_TEST);
+    client.clearLocatorCache(creds, table);
+  }
+
+  @Test
+  public void compactTable() throws Exception {
+    String expected[][] = new String[10][];
+    for (int i = 0; i < 10; i++) {
+      client.updateAndFlush(creds, table, mutation("row" + i, "cf", "cq", "" + i));
+      expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
+      client.flushTable(creds, table, null, null, true);
+    }
+    assertScan(expected, table);
 
     // compact
-    client.compactTable(creds, TABLE_TEST, null, null, null, true, true, null);
-    assertEquals(1, countFiles(TABLE_TEST));
-    assertScan(expected, TABLE_TEST);
+    client.compactTable(creds, table, null, null, null, true, true, null);
+    assertEquals(1, countFiles(table));
+    assertScan(expected, table);
+  }
 
-    // get disk usage
-    client.cloneTable(creds, TABLE_TEST, TABLE_TEST2, true, null, null);
+  @Test
+  public void diskUsage() throws Exception {
+    String TABLE_TEST2 = getUniqueNames(2)[1];
+
+    // Write some data
+    String expected[][] = new String[10][];
+    for (int i = 0; i < 10; i++) {
+      client.updateAndFlush(creds, table, mutation("row" + i, "cf", "cq", "" + i));
+      expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
+      client.flushTable(creds, table, null, null, true);
+    }
+    assertScan(expected, table);
+
+    // compact
+    client.compactTable(creds, table, null, null, null, true, true, null);
+    assertEquals(1, countFiles(table));
+    assertScan(expected, table);
+
+    // Clone the table
+    client.cloneTable(creds, table, TABLE_TEST2, true, null, null);
     Set<String> tablesToScan = new HashSet<String>();
-    tablesToScan.add(TABLE_TEST);
+    tablesToScan.add(table);
     tablesToScan.add(TABLE_TEST2);
     tablesToScan.add("foo");
+
     client.createTable(creds, "foo", true, TimeType.MILLIS);
+
+    // get disk usage
     List<DiskUsage> diskUsage = (client.getDiskUsage(creds, tablesToScan));
     assertEquals(2, diskUsage.size());
+    // The original table and the clone are lumped together (they share the same files)
     assertEquals(2, diskUsage.get(0).getTables().size());
+    // The empty table we created
     assertEquals(1, diskUsage.get(1).getTables().size());
+
+    // Compact the clone so it writes its own files instead of referring to the original
     client.compactTable(creds, TABLE_TEST2, null, null, null, true, true, null);
+
     diskUsage = (client.getDiskUsage(creds, tablesToScan));
     assertEquals(3, diskUsage.size());
+    // The original
     assertEquals(1, diskUsage.get(0).getTables().size());
+    // The clone w/ its own files now
     assertEquals(1, diskUsage.get(1).getTables().size());
+    // The empty table
     assertEquals(1, diskUsage.get(2).getTables().size());
     client.deleteTable(creds, "foo");
     client.deleteTable(creds, TABLE_TEST2);
+  }
+
+  @Test
+  public void importExportTable() throws Exception {
+    // Write some data
+    String expected[][] = new String[10][];
+    for (int i = 0; i < 10; i++) {
+      client.updateAndFlush(creds, table, mutation("row" + i, "cf", "cq", "" + i));
+      expected[i] = new String[] {"row" + i, "cf", "cq", "" + i};
+      client.flushTable(creds, table, null, null, true);
+    }
+    assertScan(expected, table);
 
     // export/import
     MiniAccumuloClusterImpl cluster = SharedMiniClusterIT.getCluster();
@@ -1141,8 +1352,8 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertTrue(fs.mkdirs(dir));
     Path destDir = new Path(base, "test_dest");
     assertTrue(fs.mkdirs(destDir));
-    client.offlineTable(creds, TABLE_TEST, false);
-    client.exportTable(creds, TABLE_TEST, dir.toString());
+    client.offlineTable(creds, table, false);
+    client.exportTable(creds, table, dir.toString());
     // copy files to a new location
     FSDataInputStream is = fs.open(new Path(dir, "distcp.txt"));
     try (BufferedReader r = new BufferedReader(new InputStreamReader(is))) {
@@ -1154,7 +1365,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
         FileUtil.copy(fs, srcPath, fs, destDir, false, fs.getConf());
       }
     }
-    client.deleteTable(creds, TABLE_TEST);
+    client.deleteTable(creds, table);
     client.importTable(creds, "testify", destDir.toString());
     assertScan(expected, "testify");
     client.deleteTable(creds, "testify");
@@ -1166,47 +1377,84 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     } catch (Exception e) {}
 
     assertFalse(client.listTables(creds).contains("testify2"));
+  }
 
-    // Locality groups
-    client.createTable(creds, "test", true, TimeType.MILLIS);
+  @Test
+  public void localityGroups() throws Exception {
     Map<String,Set<String>> groups = new HashMap<String,Set<String>>();
     groups.put("group1", Collections.singleton("cf1"));
     groups.put("group2", Collections.singleton("cf2"));
-    client.setLocalityGroups(creds, "test", groups);
-    assertEquals(groups, client.getLocalityGroups(creds, "test"));
-    // table properties
-    Map<String,String> orig = client.getTableProperties(creds, "test");
-    client.setTableProperty(creds, "test", "table.split.threshold", "500M");
-    Map<String,String> update = client.getTableProperties(creds, "test");
+    client.setLocalityGroups(creds, table, groups);
+    assertEquals(groups, client.getLocalityGroups(creds, table));
+  }
+
+  @Test
+  public void tableProperties() throws Exception {
+    Map<String,String> systemProps = client.getSystemConfiguration(creds);
+    String systemTableSplitThreshold = systemProps.get("table.split.threshold");
+
+    Map<String,String> orig = client.getTableProperties(creds, table);
+    client.setTableProperty(creds, table, "table.split.threshold", "500M");
+
+    // Get the new table property value
+    Map<String,String> update = client.getTableProperties(creds, table);
     assertEquals(update.get("table.split.threshold"), "500M");
-    client.removeTableProperty(creds, "test", "table.split.threshold");
-    update = client.getTableProperties(creds, "test");
+
+    // Table level properties shouldn't affect system level values
+    assertEquals(systemTableSplitThreshold, client.getSystemConfiguration(creds).get("table.split.threshold"));
+
+    client.removeTableProperty(creds, table, "table.split.threshold");
+    update = client.getTableProperties(creds, table);
     assertEquals(orig, update);
+  }
+
+  @Test
+  public void tableRenames() throws Exception {
     // rename table
     Map<String,String> tables = client.tableIdMap(creds);
-    client.renameTable(creds, "test", "bar");
+    client.renameTable(creds, table, "bar");
     Map<String,String> tables2 = client.tableIdMap(creds);
-    assertEquals(tables.get("test"), tables2.get("bar"));
+    assertEquals(tables.get(table), tables2.get("bar"));
     // table exists
     assertTrue(client.tableExists(creds, "bar"));
-    assertFalse(client.tableExists(creds, "test"));
-    // bulk import
+    assertFalse(client.tableExists(creds, table));
+    client.renameTable(creds, "bar", table);
+  }
+
+  @Test
+  public void bulkImport() throws Exception {
+    MiniAccumuloClusterImpl cluster = SharedMiniClusterIT.getCluster();
+    FileSystem fs = cluster.getFileSystem();
+    Path base = cluster.getTemporaryPath();
+    Path dir = new Path(base, "test");
+    assertTrue(fs.mkdirs(dir));
+
+    // Write an RFile
     String filename = dir + "/bulk/import/rfile.rf";
     FileSKVWriter writer = FileOperations.getInstance().openWriter(filename, fs, fs.getConf(), DefaultConfiguration.getInstance());
     writer.startDefaultLocalityGroup();
     writer.append(new org.apache.accumulo.core.data.Key(new Text("a"), new Text("b"), new Text("c")), new Value("value".getBytes()));
     writer.close();
+
+    // Create failures directory
     fs.mkdirs(new Path(dir + "/bulk/fail"));
-    client.importDirectory(creds, "bar", dir + "/bulk/import", dir + "/bulk/fail", true);
-    String scanner = client.createScanner(creds, "bar", null);
+
+    // Run the bulk import
+    client.importDirectory(creds, table, dir + "/bulk/import", dir + "/bulk/fail", true);
+
+    // Make sure we find the data
+    String scanner = client.createScanner(creds, table, null);
     ScanResult more = client.nextK(scanner, 100);
     client.closeScanner(scanner);
     assertEquals(1, more.results.size());
-    ByteBuffer maxRow = client.getMaxRow(creds, "bar", null, null, false, null, false);
+    ByteBuffer maxRow = client.getMaxRow(creds, table, null, null, false, null, false);
     assertEquals(s2bb("a"), maxRow);
+  }
 
-    assertFalse(client.testTableClassLoad(creds, "bar", "abc123", SortedKeyValueIterator.class.getName()));
-    assertTrue(client.testTableClassLoad(creds, "bar", VersioningIterator.class.getName(), SortedKeyValueIterator.class.getName()));
+  @Test
+  public void testTableClassLoad() throws Exception {
+    assertFalse(client.testTableClassLoad(creds, table, "abc123", SortedKeyValueIterator.class.getName()));
+    assertTrue(client.testTableClassLoad(creds, table, VersioningIterator.class.getName(), SortedKeyValueIterator.class.getName()));
   }
 
   private Condition newCondition(String cf, String cq) {
@@ -1245,14 +1493,15 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test
   public void testConditionalWriter() throws Exception {
-    final String TABLE_TEST = getUniqueNames(1)[0];
-
-    client.createTable(creds, TABLE_TEST, true, TimeType.MILLIS);
-
-    client.addConstraint(creds, TABLE_TEST, NumericValueConstraint.class.getName());
+    client.addConstraint(creds, table, NumericValueConstraint.class.getName());
     UtilWaitThread.sleep(ZOOKEEPER_PROPAGATION_TIME);
 
-    String cwid = client.createConditionalWriter(creds, TABLE_TEST, new ConditionalWriterOptions());
+    while (!client.listConstraints(creds, table).containsKey(NumericValueConstraint.class.getName())) {
+      log.info("Failed to see constraint");
+      Thread.sleep(1000);
+    }
+
+    String cwid = client.createConditionalWriter(creds, table, new ConditionalWriterOptions());
 
     Map<ByteBuffer,ConditionalUpdates> updates = new HashMap<ByteBuffer,ConditionalUpdates>();
 
@@ -1266,7 +1515,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(1, results.size());
     assertEquals(ConditionalStatus.ACCEPTED, results.get(s2bb("00345")));
 
-    assertScan(new String[][] { {"00345", "data", "img", "73435435"}, {"00345", "meta", "seq", "1"}}, TABLE_TEST);
+    assertScan(new String[][] { {"00345", "data", "img", "73435435"}, {"00345", "meta", "seq", "1"}}, table);
 
     // test not setting values on conditions
     updates.clear();
@@ -1280,7 +1529,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00345")));
     assertEquals(ConditionalStatus.ACCEPTED, results.get(s2bb("00346")));
 
-    assertScan(new String[][] { {"00345", "data", "img", "73435435"}, {"00345", "meta", "seq", "1"}, {"00346", "meta", "seq", "1"}}, TABLE_TEST);
+    assertScan(new String[][] { {"00345", "data", "img", "73435435"}, {"00345", "meta", "seq", "1"}, {"00346", "meta", "seq", "1"}}, table);
 
     // test setting values on conditions
     updates.clear();
@@ -1298,7 +1547,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.ACCEPTED, results.get(s2bb("00345")));
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00346")));
 
-    assertScan(new String[][] { {"00345", "data", "img", "567890"}, {"00345", "meta", "seq", "2"}, {"00346", "meta", "seq", "1"}}, TABLE_TEST);
+    assertScan(new String[][] { {"00345", "data", "img", "567890"}, {"00345", "meta", "seq", "2"}, {"00346", "meta", "seq", "1"}}, table);
 
     // test setting timestamp on condition to a non-existant version
     updates.clear();
@@ -1313,7 +1562,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(1, results.size());
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00345")));
 
-    assertScan(new String[][] { {"00345", "data", "img", "567890"}, {"00345", "meta", "seq", "2"}, {"00346", "meta", "seq", "1"}}, TABLE_TEST);
+    assertScan(new String[][] { {"00345", "data", "img", "567890"}, {"00345", "meta", "seq", "2"}, {"00346", "meta", "seq", "1"}}, table);
 
     // test setting timestamp to an existing version
 
@@ -1329,13 +1578,13 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(1, results.size());
     assertEquals(ConditionalStatus.ACCEPTED, results.get(s2bb("00345")));
 
-    assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"}}, TABLE_TEST);
+    assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"}}, table);
 
     // run test w/ condition that has iterators
     // following should fail w/o iterator
-    client.updateAndFlush(creds, TABLE_TEST, Collections.singletonMap(s2bb("00347"), Arrays.asList(newColUpdate("data", "count", "1"))));
-    client.updateAndFlush(creds, TABLE_TEST, Collections.singletonMap(s2bb("00347"), Arrays.asList(newColUpdate("data", "count", "1"))));
-    client.updateAndFlush(creds, TABLE_TEST, Collections.singletonMap(s2bb("00347"), Arrays.asList(newColUpdate("data", "count", "1"))));
+    client.updateAndFlush(creds, table, Collections.singletonMap(s2bb("00347"), Arrays.asList(newColUpdate("data", "count", "1"))));
+    client.updateAndFlush(creds, table, Collections.singletonMap(s2bb("00347"), Arrays.asList(newColUpdate("data", "count", "1"))));
+    client.updateAndFlush(creds, table, Collections.singletonMap(s2bb("00347"), Arrays.asList(newColUpdate("data", "count", "1"))));
 
     updates.clear();
     updates.put(s2bb("00347"),
@@ -1347,7 +1596,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00347")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "1"}}, TABLE_TEST);
+        {"00347", "data", "count", "1"}}, table);
 
     // following test w/ iterator setup should succeed
     Condition iterCond = newCondition("data", "count", "3");
@@ -1366,7 +1615,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.ACCEPTED, results.get(s2bb("00347")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, TABLE_TEST);
+        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, table);
 
     // test a mutation that violated a constraint
     updates.clear();
@@ -1379,7 +1628,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.VIOLATED, results.get(s2bb("00347")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, TABLE_TEST);
+        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, table);
 
     // run test with two conditions
     // both conditions should fail
@@ -1395,7 +1644,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00347")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, TABLE_TEST);
+        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, table);
 
     // one condition should fail
     updates.clear();
@@ -1410,7 +1659,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00347")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, TABLE_TEST);
+        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, table);
 
     // one condition should fail
     updates.clear();
@@ -1425,13 +1674,13 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00347")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, TABLE_TEST);
+        {"00347", "data", "count", "1"}, {"00347", "data", "img", "1234567890"}}, table);
 
     // both conditions should succeed
 
     ConditionalStatus result = client.updateRowConditionally(
         creds,
-        TABLE_TEST,
+        table,
         s2bb("00347"),
         new ConditionalUpdates(Arrays.asList(newCondition("data", "img", "1234567890"), newCondition("data", "count", "1")), Arrays.asList(
             newColUpdate("data", "count", "3"), newColUpdate("data", "img", "0987654321"))));
@@ -1439,7 +1688,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.ACCEPTED, result);
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}}, TABLE_TEST);
+        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}}, table);
 
     client.closeConditionalWriter(cwid);
     try {
@@ -1450,12 +1699,12 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     // run test with colvis
     client.createLocalUser(creds, "cwuser", s2bb("bestpasswordever"));
     client.changeUserAuthorizations(creds, "cwuser", Collections.singleton(s2bb("A")));
-    client.grantTablePermission(creds, "cwuser", TABLE_TEST, TablePermission.WRITE);
-    client.grantTablePermission(creds, "cwuser", TABLE_TEST, TablePermission.READ);
+    client.grantTablePermission(creds, "cwuser", table, TablePermission.WRITE);
+    client.grantTablePermission(creds, "cwuser", table, TablePermission.READ);
 
     ByteBuffer cwuCreds = client.login("cwuser", Collections.singletonMap("password", "bestpasswordever"));
 
-    cwid = client.createConditionalWriter(cwuCreds, TABLE_TEST, new ConditionalWriterOptions().setAuthorizations(Collections.singleton(s2bb("A"))));
+    cwid = client.createConditionalWriter(cwuCreds, table, new ConditionalWriterOptions().setAuthorizations(Collections.singleton(s2bb("A"))));
 
     updates.clear();
     updates.put(
@@ -1472,7 +1721,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.INVISIBLE_VISIBILITY, results.get(s2bb("00349")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}, {"00348", "data", "seq", "1"}}, TABLE_TEST);
+        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}, {"00348", "data", "seq", "1"}}, table);
 
     updates.clear();
 
@@ -1488,7 +1737,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.REJECTED, results.get(s2bb("00348")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}, {"00348", "data", "seq", "1"}}, TABLE_TEST);
+        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}, {"00348", "data", "seq", "1"}}, table);
 
     updates.clear();
     updates.put(
@@ -1502,7 +1751,7 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
     assertEquals(ConditionalStatus.ACCEPTED, results.get(s2bb("00348")));
 
     assertScan(new String[][] { {"00345", "data", "img", "1234567890"}, {"00345", "meta", "seq", "3"}, {"00346", "meta", "seq", "1"},
-        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}, {"00348", "data", "seq", "2"}}, TABLE_TEST);
+        {"00347", "data", "count", "3"}, {"00347", "data", "img", "0987654321"}, {"00348", "data", "seq", "2"}}, table);
 
     client.closeConditionalWriter(cwid);
     try {
@@ -1583,37 +1832,33 @@ public abstract class SimpleProxyBase extends SharedMiniClusterIT {
 
   @Test
   public void testCompactionStrategy() throws Exception {
-    final String tableName = getUniqueNames(1)[0];
-
-    client.createTable(creds, tableName, true, TimeType.MILLIS);
-
     client.setProperty(creds, Property.VFS_CONTEXT_CLASSPATH_PROPERTY.getKey() + "context1", System.getProperty("user.dir")
         + "/src/test/resources/TestCompactionStrat.jar");
-    client.setTableProperty(creds, tableName, Property.TABLE_CLASSPATH.getKey(), "context1");
+    client.setTableProperty(creds, table, Property.TABLE_CLASSPATH.getKey(), "context1");
 
-    client.addSplits(creds, tableName, Collections.singleton(s2bb("efg")));
+    client.addSplits(creds, table, Collections.singleton(s2bb("efg")));
 
-    client.updateAndFlush(creds, tableName, mutation("a", "cf", "cq", "v1"));
-    client.flushTable(creds, tableName, null, null, true);
+    client.updateAndFlush(creds, table, mutation("a", "cf", "cq", "v1"));
+    client.flushTable(creds, table, null, null, true);
 
-    client.updateAndFlush(creds, tableName, mutation("b", "cf", "cq", "v2"));
-    client.flushTable(creds, tableName, null, null, true);
+    client.updateAndFlush(creds, table, mutation("b", "cf", "cq", "v2"));
+    client.flushTable(creds, table, null, null, true);
 
-    client.updateAndFlush(creds, tableName, mutation("y", "cf", "cq", "v1"));
-    client.flushTable(creds, tableName, null, null, true);
+    client.updateAndFlush(creds, table, mutation("y", "cf", "cq", "v1"));
+    client.flushTable(creds, table, null, null, true);
 
-    client.updateAndFlush(creds, tableName, mutation("z", "cf", "cq", "v2"));
-    client.flushTable(creds, tableName, null, null, true);
+    client.updateAndFlush(creds, table, mutation("z", "cf", "cq", "v2"));
+    client.flushTable(creds, table, null, null, true);
 
-    assertEquals(4, countFiles(tableName));
+    assertEquals(4, countFiles(table));
 
     CompactionStrategyConfig csc = new CompactionStrategyConfig();
 
     // The EfgCompactionStrat will only compact tablets with and end row of efg
     csc.setClassName("org.apache.accumulo.test.EfgCompactionStrat");
 
-    client.compactTable(creds, tableName, null, null, null, true, true, csc);
+    client.compactTable(creds, table, null, null, null, true, true, csc);
 
-    assertEquals(3, countFiles(tableName));
+    assertEquals(3, countFiles(table));
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d81ef224/test/src/test/java/org/apache/accumulo/proxy/TBinaryProxyIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/TBinaryProxyIT.java b/test/src/test/java/org/apache/accumulo/proxy/TBinaryProxyIT.java
index 08c0e73..a7ada4a 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/TBinaryProxyIT.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/TBinaryProxyIT.java
@@ -17,17 +17,17 @@
 package org.apache.accumulo.proxy;
 
 import org.apache.thrift.protocol.TBinaryProtocol;
-import org.apache.thrift.protocol.TProtocolFactory;
+import org.junit.BeforeClass;
 
 /**
  *
  */
 public class TBinaryProxyIT extends SimpleProxyBase {
 
-  private static final TBinaryProtocol.Factory factory = new TBinaryProtocol.Factory();
-
-  @Override
-  public TProtocolFactory getProtocol() {
-    return factory;
+  @BeforeClass
+  public static void setProtocol() throws Exception {
+    SimpleProxyBase.factory = new TBinaryProtocol.Factory();
+    setUpProxy();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d81ef224/test/src/test/java/org/apache/accumulo/proxy/TCompactProxyIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/TCompactProxyIT.java b/test/src/test/java/org/apache/accumulo/proxy/TCompactProxyIT.java
index d053812..e717d44 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/TCompactProxyIT.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/TCompactProxyIT.java
@@ -17,17 +17,16 @@
 package org.apache.accumulo.proxy;
 
 import org.apache.thrift.protocol.TCompactProtocol;
-import org.apache.thrift.protocol.TProtocolFactory;
+import org.junit.BeforeClass;
 
 /**
  *
  */
 public class TCompactProxyIT extends SimpleProxyBase {
 
-  private static final TCompactProtocol.Factory factory = new TCompactProtocol.Factory();
-
-  @Override
-  public TProtocolFactory getProtocol() {
-    return factory;
+  @BeforeClass
+  public static void setProtocol() throws Exception {
+    SimpleProxyBase.factory = new TCompactProtocol.Factory();
+    setUpProxy();
   }
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d81ef224/test/src/test/java/org/apache/accumulo/proxy/TJsonProtocolProxyIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/TJsonProtocolProxyIT.java b/test/src/test/java/org/apache/accumulo/proxy/TJsonProtocolProxyIT.java
index 81b0f53..e3ff1da 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/TJsonProtocolProxyIT.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/TJsonProtocolProxyIT.java
@@ -17,17 +17,17 @@
 package org.apache.accumulo.proxy;
 
 import org.apache.thrift.protocol.TJSONProtocol;
-import org.apache.thrift.protocol.TProtocolFactory;
+import org.junit.BeforeClass;
 
 /**
  *
  */
 public class TJsonProtocolProxyIT extends SimpleProxyBase {
 
-  private static final TJSONProtocol.Factory factory = new TJSONProtocol.Factory();
-
-  @Override
-  public TProtocolFactory getProtocol() {
-    return factory;
+  @BeforeClass
+  public static void setProtocol() throws Exception {
+    SimpleProxyBase.factory = new TJSONProtocol.Factory();
+    setUpProxy();
   }
+
 }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/d81ef224/test/src/test/java/org/apache/accumulo/proxy/TTupleProxyIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/proxy/TTupleProxyIT.java b/test/src/test/java/org/apache/accumulo/proxy/TTupleProxyIT.java
index 5f69c58..eaed86b 100644
--- a/test/src/test/java/org/apache/accumulo/proxy/TTupleProxyIT.java
+++ b/test/src/test/java/org/apache/accumulo/proxy/TTupleProxyIT.java
@@ -16,18 +16,18 @@
  */
 package org.apache.accumulo.proxy;
 
-import org.apache.thrift.protocol.TProtocolFactory;
 import org.apache.thrift.protocol.TTupleProtocol;
+import org.junit.BeforeClass;
 
 /**
  *
  */
 public class TTupleProxyIT extends SimpleProxyBase {
 
-  private static final TTupleProtocol.Factory factory = new TTupleProtocol.Factory();
-
-  @Override
-  public TProtocolFactory getProtocol() {
-    return factory;
+  @BeforeClass
+  public static void setProtocol() throws Exception {
+    SimpleProxyBase.factory = new TTupleProtocol.Factory();
+    setUpProxy();
   }
+
 }