From fbb03c611af27ff90322336ff9ee903c2be92d4f Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Mon, 21 Nov 2011 10:44:29 +0200 Subject: [PATCH] add a sleep to fix test (need to think of a better fix) --- .../test/integration/gateway/none/RecoverAfterNodesTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/gateway/none/RecoverAfterNodesTests.java b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/gateway/none/RecoverAfterNodesTests.java index 3836e96c8b4..53bc2ac0cb2 100644 --- a/modules/test/integration/src/test/java/org/elasticsearch/test/integration/gateway/none/RecoverAfterNodesTests.java +++ b/modules/test/integration/src/test/java/org/elasticsearch/test/integration/gateway/none/RecoverAfterNodesTests.java @@ -68,7 +68,7 @@ public class RecoverAfterNodesTests extends AbstractNodesTests { equalTo(true)); } - @Test public void testRecoverAfterMasterNodes() { + @Test public void testRecoverAfterMasterNodes() throws Exception { logger.info("--> start master_node (1)"); startNode("master1", settingsBuilder().put("gateway.recover_after_master_nodes", 2).put("node.data", false).put("node.master", true)); assertThat(client("master1").admin().cluster().prepareState().setLocal(true).execute().actionGet() @@ -98,6 +98,7 @@ public class RecoverAfterNodesTests extends AbstractNodesTests { logger.info("--> start master_node (2)"); startNode("master2", settingsBuilder().put("gateway.recover_after_master_nodes", 2).put("node.data", false).put("node.master", true)); + Thread.sleep(300); assertThat(client("master1").admin().cluster().prepareState().setLocal(true).execute().actionGet() .state().blocks().global(ClusterBlockLevel.METADATA).isEmpty(), equalTo(true));