Updated Branches: refs/heads/master fe0f9a809 -> 294294b4a
Fixing a problem with the unit test. Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/294294b4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/294294b4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/294294b4 Branch: refs/heads/master Commit: 294294b4a0fc2bbc89c62cbe14039124a3c05286 Parents: fe0f9a8 Author: Aaron McCurry <[email protected]> Authored: Thu Oct 24 16:18:29 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Thu Oct 24 16:19:46 2013 -0400 ---------------------------------------------------------------------- .../clusterstatus/ZookeeperClusterStatusTest.java | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/294294b4/blur-core/src/test/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatusTest.java ---------------------------------------------------------------------- diff --git a/blur-core/src/test/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatusTest.java b/blur-core/src/test/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatusTest.java index f143ae1..b8d0cf7 100644 --- a/blur-core/src/test/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatusTest.java +++ b/blur-core/src/test/java/org/apache/blur/manager/clusterstatus/ZookeeperClusterStatusTest.java @@ -90,11 +90,20 @@ public class ZookeeperClusterStatusTest { } @After - public void teardown() throws InterruptedException { + public void teardown() throws InterruptedException, KeeperException { + rmr(zooKeeper, "/blur"); clusterStatus.close(); zooKeeper.close(); } + private static void rmr(ZooKeeper zooKeeper, String path) throws KeeperException, InterruptedException { + List<String> children = zooKeeper.getChildren(path, false); + for (String c : children) { + rmr(zooKeeper, path + "/" + c); + } + zooKeeper.delete(path, -1); + } + @Test public void testGetClusterList() { LOG.warn("testGetClusterList"); @@ -164,7 +173,8 @@ public class ZookeeperClusterStatusTest { } @Test - public void testGetTableList() { + public void testGetTableList() throws KeeperException, InterruptedException { + testGetClusterTable(); assertEquals(Arrays.asList(TEST), clusterStatus.getTableList(false)); }
