Index: src/test/java/org/apache/hadoop/hbase/client/TestHTablePool.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/client/TestHTablePool.java (revision 1024102) +++ src/test/java/org/apache/hadoop/hbase/client/TestHTablePool.java (working copy) @@ -23,11 +23,9 @@ import junit.framework.Assert; -import org.apache.hadoop.hbase.HBaseConfiguration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.HColumnDescriptor; import org.apache.hadoop.hbase.HTableDescriptor; -import org.apache.hadoop.hbase.MasterNotRunningException; import org.apache.hadoop.hbase.util.Bytes; import org.junit.AfterClass; import org.junit.BeforeClass; @@ -43,7 +41,9 @@ @BeforeClass public static void beforeClass() throws Exception { TEST_UTIL.startMiniCluster(1); - + TEST_UTIL.createTable(Bytes.toBytes("testTable"), Bytes.toBytes("family")); + TEST_UTIL.createTable(Bytes.toBytes("testTable1"), Bytes.toBytes("family")); + TEST_UTIL.createTable(Bytes.toBytes("testTable2"), Bytes.toBytes("family")); } @AfterClass @@ -53,7 +53,8 @@ @Test public void testTableWithStringName() { - HTablePool pool = new HTablePool((HBaseConfiguration)null, Integer.MAX_VALUE); + HTablePool pool = new HTablePool(TEST_UTIL.getConfiguration(), + Integer.MAX_VALUE); String tableName = "testTable"; // Request a table from an empty pool @@ -70,7 +71,8 @@ @Test public void testTableWithByteArrayName() { - HTablePool pool = new HTablePool((HBaseConfiguration)null, Integer.MAX_VALUE); + HTablePool pool = new HTablePool(TEST_UTIL.getConfiguration(), + Integer.MAX_VALUE); byte[] tableName = Bytes.toBytes("testTable"); // Request a table from an empty pool @@ -87,7 +89,7 @@ @Test public void testTableWithMaxSize() { - HTablePool pool = new HTablePool((HBaseConfiguration)null, 2); + HTablePool pool = new HTablePool(TEST_UTIL.getConfiguration(), 2); String tableName = "testTable"; // Request tables from an empty pool @@ -112,7 +114,8 @@ @Test public void testTablesWithDifferentNames() { - HTablePool pool = new HTablePool((HBaseConfiguration)null, Integer.MAX_VALUE); + HTablePool pool = new HTablePool(TEST_UTIL.getConfiguration(), + Integer.MAX_VALUE); String tableName1 = "testTable1"; String tableName2 = "testTable2"; @@ -138,18 +141,7 @@ HTablePool pool = new HTablePool(TEST_UTIL.getConfiguration(), 4); String tableName = "testTable"; - HBaseAdmin admin = new HBaseAdmin(TEST_UTIL.getConfiguration()); - if (admin.tableExists(tableName)) { - admin.deleteTable(tableName); - } - - HTableDescriptor tableDescriptor = new HTableDescriptor(Bytes - .toBytes(tableName)); - tableDescriptor.addFamily(new HColumnDescriptor("randomFamily")); - admin.createTable(tableDescriptor); - - // Request tables from an empty pool HTableInterface[] tables = new HTableInterface[4]; for (int i = 0; i < 4; ++i ) {