Skip to content

Commit

Permalink
Increase master disruption test assert timeouts
Browse files Browse the repository at this point in the history
After elastic#51803, the timeouts waiting for assertions around master change
were too short.
  • Loading branch information
henningandersen committed Feb 3, 2020
1 parent b9fafc7 commit 5e38018
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ ClusterState getNodeClusterState(String node) {
}

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 {
Expand Down Expand Up @@ -176,7 +176,7 @@ void assertDifferentMaster(final String node, final String oldMasterNode) throws
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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception {
// 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);
Expand Down Expand Up @@ -228,7 +228,7 @@ public void testVerifyApiBlocksDuringPartition() throws Exception {
// 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
Expand Down

0 comments on commit 5e38018

Please sign in to comment.