Skip to content

Commit

Permalink
Fix testNoMasterActions (#43471)
Browse files Browse the repository at this point in the history
This commit performs the proper restore of network disruption.
Previously disruptionScheme.stopDisrupting() was called that does not
ensure that connectivity between cluster nodes is restored. The test
was checking that the cluster has green status, but it was not checking
that connectivity between nodes is restored.
Here we switch to internalCluster().clearDisruptionScheme(true) which
performs both checks before returning.
Similar to #42798
Closes #42051
  • Loading branch information
andrershov authored Jun 24, 2019
1 parent 893785a commit cd1ed66
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,7 @@ public void testNoMasterActions() throws Exception {
bulkRequestBuilder.setTimeout(timeout);
checkWriteAction(bulkRequestBuilder);

disruptionScheme.stopDisrupting();

client().admin().cluster().prepareHealth().setWaitForGreenStatus().setWaitForNodes("3").execute().actionGet();
internalCluster().clearDisruptionScheme(true);
}

void checkUpdateAction(boolean autoCreateIndex, TimeValue timeout, ActionRequestBuilder<?, ?> builder) {
Expand Down

0 comments on commit cd1ed66

Please sign in to comment.