sleep before checking for no master block

This commit is contained in:
Shay Banon 2012-01-08 12:17:53 +02:00
parent e059e213db
commit 45b5594e9b
1 changed files with 2 additions and 0 deletions

View File

@ -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));