Fix testNoMasterActions (#43471)

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

(cherry picked from commit cd1ed662f847a0055ede7dfbd325e214ec4d1490)
This commit is contained in:
Andrey Ershov 2019-06-24 17:52:49 +03:00
parent 9794409ca0
commit 98d7d231bb
1 changed files with 1 additions and 3 deletions

View File

@ -163,9 +163,7 @@ public class NoMasterNodeIT extends ESIntegTestCase {
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) {