### Eclipse Workspace Patch 1.0 #P 0.90branch Index: src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java =================================================================== --- src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java (revision 1414615) +++ src/test/java/org/apache/hadoop/hbase/TestZooKeeper.java (working copy) @@ -19,8 +19,8 @@ */ package org.apache.hadoop.hbase; -import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.fail; @@ -92,7 +92,7 @@ throws IOException, InterruptedException { LOG.info("testClientSessionExpired"); Configuration c = new Configuration(TEST_UTIL.getConfiguration()); - new HTable(c, HConstants.META_TABLE_NAME); + HTable table = new HTable(c, HConstants.META_TABLE_NAME); String quorumServers = ZKConfig.getZKQuorumServersString(c); int sessionTimeout = 5 * 1000; // 5 seconds HConnection connection = HConnectionManager.getConnection(c); @@ -102,6 +102,8 @@ ZooKeeper zk = new ZooKeeper(quorumServers, sessionTimeout, EmptyWatcher.instance, sessionID, password); zk.close(); + table.close(); + HConnectionManager.deleteConnection(c, true); Thread.sleep(sessionTimeout * 3L);