Skip to content

Commit

Permalink
Test: remove wait on events from multipleNodesShutdownNonMasterNodes
Browse files Browse the repository at this point in the history
The test validates that minimum master node is honored after shutting down nodes. When nodes are restarted we may go through a couple of master election of a master is elected and  discovers some of the old nodes left before all new node have joined. Processing that node failure the master de-elects it self, which is fine because we will start a new master election. Test however runs a clusterHealth call with a  wait for event. This is implemented using a cluster state update task which fails when the master steps down. Longer term fix requires a rewrite of the cluster health API code but a quick fix is not check for events (not needed for this test).
  • Loading branch information
bleskes committed Oct 27, 2014
1 parent 5e283da commit fa02a9e
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -236,12 +236,12 @@ public boolean apply(Object obj) {
logger.info("--> start back the 2 nodes ");
String[] newNodes = internalCluster().startNodesAsync(2, settings).get().toArray(Strings.EMPTY_ARRAY);

clusterHealthResponse = client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForNodes("4").execute().actionGet();
clusterHealthResponse = client().admin().cluster().prepareHealth().setWaitForNodes("4").execute().actionGet();
assertThat(clusterHealthResponse.isTimedOut(), equalTo(false));

logger.info("Running Cluster Health");
logger.info("--> running Cluster Health");
ClusterHealthResponse clusterHealth = client().admin().cluster().health(clusterHealthRequest().waitForGreenStatus()).actionGet();
logger.info("Done Cluster Health, status " + clusterHealth.getStatus());
logger.info("--> done Cluster Health, status " + clusterHealth.getStatus());
assertThat(clusterHealth.isTimedOut(), equalTo(false));
assertThat(clusterHealth.getStatus(), equalTo(ClusterHealthStatus.GREEN));

Expand Down

0 comments on commit fa02a9e

Please sign in to comment.