浏览代码

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
Andrey Ershov 6 年之前
父节点
当前提交
cd1ed662f8
共有 1 个文件被更改,包括 1 次插入3 次删除
  1. 1 3
      server/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java

+ 1 - 3
server/src/test/java/org/elasticsearch/cluster/NoMasterNodeIT.java

@@ -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) {