From 6ddf5bf9c87a778200f1af68a2d7f8250fc4aee4 Mon Sep 17 00:00:00 2001 From: Tanguy Leroux Date: Mon, 23 Mar 2020 16:23:08 +0100 Subject: [PATCH] Increase ensureGreen() timeout in CloseWhileRelocatingShardsIT (#53981) The test in CloseWhileRelocatingShardsIT failed recently multiple times (3) when waiting for initial indices to be become green. Looking at the execution logs from #53544 it appears at the very beginning of the test and when the WindowsFS file system is picked up (which is known to slow down tests). This commit simply increases the timeout for the first ensureGreen() to 60 seconds. If the test continues to fail, we might want to test a larger timeout or disable WindowsFS for this test. Closes #53544 --- .../indices/state/CloseWhileRelocatingShardsIT.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java b/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java index 2125184baef63..645983af0bc2d 100644 --- a/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java +++ b/server/src/test/java/org/elasticsearch/indices/state/CloseWhileRelocatingShardsIT.java @@ -33,6 +33,7 @@ import org.elasticsearch.cluster.routing.allocation.decider.ThrottlingAllocationDecider; import org.elasticsearch.cluster.service.ClusterService; import org.elasticsearch.common.settings.Settings; +import org.elasticsearch.common.unit.TimeValue; import org.elasticsearch.common.util.concurrent.ConcurrentCollections; import org.elasticsearch.index.shard.ShardId; import org.elasticsearch.indices.recovery.PeerRecoverySourceService; @@ -117,7 +118,7 @@ public void testCloseWhileRelocatingShards() throws Exception { indices[i] = indexName; } - ensureGreen(indices); + ensureGreen(TimeValue.timeValueSeconds(60L),indices); assertAcked(client().admin().cluster().prepareUpdateSettings() .setTransientSettings(Settings.builder() .put(EnableAllocationDecider.CLUSTER_ROUTING_REBALANCE_ENABLE_SETTING.getKey(), Rebalance.NONE.toString())));