Browse Source

Increase master disruption test assert timeouts (#51810)

After #51803, the timeouts waiting for assertions around master change
were too short.
Henning Andersen 5 năm trước cách đây
mục cha
commit
55d6ef298a

+ 2 - 2
server/src/test/java/org/elasticsearch/discovery/AbstractDisruptionTestCase.java

@@ -145,7 +145,7 @@ public abstract class AbstractDisruptionTestCase extends ESIntegTestCase {
     }
 
     void assertNoMaster(final String node) throws Exception {
-        assertNoMaster(node, null, TimeValue.timeValueSeconds(10));
+        assertNoMaster(node, null, TimeValue.timeValueSeconds(30));
     }
 
     void assertNoMaster(final String node, TimeValue maxWaitTime) throws Exception {
@@ -176,7 +176,7 @@ public abstract class AbstractDisruptionTestCase extends ESIntegTestCase {
             logger.trace("[{}] master is [{}]", node, state.nodes().getMasterNode());
             assertThat("node [" + node + "] still has [" + masterNode + "] as master",
                     oldMasterNode, not(equalTo(masterNode)));
-        }, 10, TimeUnit.SECONDS);
+        }, 30, TimeUnit.SECONDS);
     }
 
     void assertMaster(String masterNode, List<String> nodes) throws Exception {

+ 2 - 2
server/src/test/java/org/elasticsearch/discovery/MasterDisruptionIT.java

@@ -189,7 +189,7 @@ public class MasterDisruptionIT extends AbstractDisruptionTestCase {
         // continuously ping until network failures have been resolved. However
         // It may a take a bit before the node detects it has been cut off from the elected master
         logger.info("waiting for isolated node [{}] to have no master", isolatedNode);
-        assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_WRITES, TimeValue.timeValueSeconds(10));
+        assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_WRITES, TimeValue.timeValueSeconds(30));
 
 
         logger.info("wait until elected master has been removed and a new 2 node cluster was from (via [{}])", isolatedNode);
@@ -228,7 +228,7 @@ public class MasterDisruptionIT extends AbstractDisruptionTestCase {
         // continuously ping until network failures have been resolved. However
         // It may a take a bit before the node detects it has been cut off from the elected master
         logger.info("waiting for isolated node [{}] to have no master", isolatedNode);
-        assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_ALL, TimeValue.timeValueSeconds(10));
+        assertNoMaster(isolatedNode, NoMasterBlockService.NO_MASTER_BLOCK_ALL, TimeValue.timeValueSeconds(30));
 
         // make sure we have stable cluster & cross partition recoveries are canceled by the removal of the missing node
         // the unresponsive partition causes recoveries to only time out after 15m (default) and these will cause