Fix testNoMasterActionsWriteMasterBlock (#42798)

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.

Closes #39688

(cherry picked from commit c8988d5cf5a85f9b28ce148dbf100aaa6682a757)
This commit is contained in:
Andrey Ershov 2019-06-04 17:22:33 +02:00
parent df124f32db
commit 6391f90616
1 changed files with 1 additions and 4 deletions

View File

@ -192,7 +192,6 @@ public class NoMasterNodeIT extends ESIntegTestCase {
} }
} }
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/39688")
public void testNoMasterActionsWriteMasterBlock() throws Exception { public void testNoMasterActionsWriteMasterBlock() throws Exception {
Settings settings = Settings.builder() Settings settings = Settings.builder()
.put(AutoCreateIndex.AUTO_CREATE_INDEX_SETTING.getKey(), false) .put(AutoCreateIndex.AUTO_CREATE_INDEX_SETTING.getKey(), false)
@ -264,8 +263,6 @@ public class NoMasterNodeIT extends ESIntegTestCase {
assertThat(e.status(), equalTo(RestStatus.SERVICE_UNAVAILABLE)); assertThat(e.status(), equalTo(RestStatus.SERVICE_UNAVAILABLE));
} }
disruptionScheme.stopDisrupting(); internalCluster().clearDisruptionScheme(true);
client().admin().cluster().prepareHealth().setWaitForGreenStatus().setWaitForNodes("3").get();
} }
} }