Skip to content

Commit 9f7ffc6

Browse files
Fix testHealthOnMasterFailover on Mac OS (elastic#71275)
Give a bit more time to complete test on mac since darwin CI workers are (sometimes) slow. Closes elastic#62690
1 parent a6c4594 commit 9f7ffc6

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/internalClusterTest/java/org/elasticsearch/cluster/ClusterHealthIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
package org.elasticsearch.cluster;
1010

11+
import org.apache.lucene.util.Constants;
1112
import org.elasticsearch.action.ActionFuture;
1213
import org.elasticsearch.action.admin.cluster.health.ClusterHealthResponse;
1314
import org.elasticsearch.action.admin.indices.settings.put.UpdateSettingsRequest;
@@ -317,9 +318,11 @@ public void testHealthOnMasterFailover() throws Exception {
317318
// Run a few health requests concurrent to master fail-overs against a data-node to make sure master failover is handled
318319
// without exceptions
319320
final int iterations = withIndex ? 10 : 20;
321+
// CI darwin workers are sometimes very slow, give them extra time.
322+
int timeoutMinutes = Constants.MAC_OS_X ? 2 : 1;
320323
for (int i = 0; i < iterations; ++i) {
321324
responseFutures.add(client(node).admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID)
322-
.setWaitForGreenStatus().setMasterNodeTimeout(TimeValue.timeValueMinutes(1)).execute());
325+
.setWaitForGreenStatus().setMasterNodeTimeout(TimeValue.timeValueMinutes(timeoutMinutes)).execute());
323326
internalCluster().restartNode(internalCluster().getMasterName(), InternalTestCluster.EMPTY_CALLBACK);
324327
}
325328
if (withIndex) {

0 commit comments

Comments
 (0)