Skip to content

Commit

Permalink
Fix testNoMasterActionsWriteMasterBlock (#42798)
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.

Closes #39688

(cherry picked from commit c8988d5)
  • Loading branch information
Andrey Ershov committed Jun 4, 2019
1 parent df124f3 commit 6391f90
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ void checkWriteAction(ActionRequestBuilder<?, ?> builder) {
}
}

@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)
Expand Down Expand Up @@ -264,8 +263,6 @@ public void testNoMasterActionsWriteMasterBlock() throws Exception {
assertThat(e.status(), equalTo(RestStatus.SERVICE_UNAVAILABLE));
}

disruptionScheme.stopDisrupting();

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

0 comments on commit 6391f90

Please sign in to comment.