From 45b5594e9bc70b694d539718f6d3f972f3d640ab Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sun, 8 Jan 2012 12:17:53 +0200 Subject: [PATCH] sleep before checking for no master block --- .../test/integration/cluster/NoMasterNodeTests.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/test/java/org/elasticsearch/test/integration/cluster/NoMasterNodeTests.java b/src/test/java/org/elasticsearch/test/integration/cluster/NoMasterNodeTests.java index 94a435161d1..a45b940cb57 100644 --- a/src/test/java/org/elasticsearch/test/integration/cluster/NoMasterNodeTests.java +++ b/src/test/java/org/elasticsearch/test/integration/cluster/NoMasterNodeTests.java @@ -64,6 +64,8 @@ public class NoMasterNodeTests extends AbstractNodesTests { node.client().admin().indices().prepareCreate("test").execute().actionGet(); node2.close(); + Thread.sleep(200); + ClusterState state = node.client().admin().cluster().prepareState().setLocal(true).execute().actionGet().state(); assertThat(state.blocks().hasGlobalBlock(Discovery.NO_MASTER_BLOCK), equalTo(true));