shard test should put the cluster back how it found it
Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/8d019a4b Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/8d019a4b Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/8d019a4b Branch: refs/heads/blur-374 Commit: 8d019a4b0d32c6f5929630fdd13d427d66953c58 Parents: bc474f8 Author: twilliams <[email protected]> Authored: Mon Sep 15 22:17:30 2014 -0400 Committer: twilliams <[email protected]> Committed: Mon Sep 15 22:17:30 2014 -0400 ---------------------------------------------------------------------- .../src/test/java/org/apache/blur/thrift/BlurClusterTest.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/8d019a4b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java ---------------------------------------------------------------------- diff --git a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java index 01ec58b..09a9be5 100644 --- a/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java +++ b/blur-core/src/test/java/org/apache/blur/thrift/BlurClusterTest.java @@ -765,9 +765,14 @@ public class BlurClusterTest { // This should block until shards have failed over client.shardServerLayout(tableName); - + + assertEquals("We should have lost a node.", 2, client.shardServerList(BlurConstants.DEFAULT).size()); assertEquals(numberOfDocs, client.query(tableName, blurQuery).getTotalResults()); + miniCluster.startShards(1, true); + Thread.sleep(TimeUnit.SECONDS.toMillis(1)); + + assertEquals("We should have the cluster back where we started.", 3, client.shardServerList(BlurConstants.DEFAULT).size()); } @Test
