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:
parent
df124f32db
commit
6391f90616
|
@ -192,7 +192,6 @@ public class NoMasterNodeIT extends ESIntegTestCase {
|
|||
}
|
||||
}
|
||||
|
||||
@AwaitsFix(bugUrl = "https://github.com/elastic/elasticsearch/issues/39688")
|
||||
public void testNoMasterActionsWriteMasterBlock() throws Exception {
|
||||
Settings settings = Settings.builder()
|
||||
.put(AutoCreateIndex.AUTO_CREATE_INDEX_SETTING.getKey(), false)
|
||||
|
@ -264,8 +263,6 @@ public class NoMasterNodeIT extends ESIntegTestCase {
|
|||
assertThat(e.status(), equalTo(RestStatus.SERVICE_UNAVAILABLE));
|
||||
}
|
||||
|
||||
disruptionScheme.stopDisrupting();
|
||||
|
||||
client().admin().cluster().prepareHealth().setWaitForGreenStatus().setWaitForNodes("3").get();
|
||||
internalCluster().clearDisruptionScheme(true);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue