Skip to content

Commit 877c594

Browse files
committed
Increase timeout for ensureGreen in testShrinkIndexPrimaryTerm
If we have created 210 shards, we may need more than 30 seconds for all shards become green. Relates #28153
1 parent 2329b23 commit 877c594

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/src/test/java/org/elasticsearch/action/admin/indices/create/ShrinkIndexIT.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
import org.elasticsearch.common.Priority;
4848
import org.elasticsearch.common.collect.ImmutableOpenMap;
4949
import org.elasticsearch.common.settings.Settings;
50+
import org.elasticsearch.common.unit.TimeValue;
5051
import org.elasticsearch.common.xcontent.XContentType;
5152
import org.elasticsearch.index.Index;
5253
import org.elasticsearch.index.IndexService;
@@ -164,7 +165,8 @@ public void testShrinkIndexPrimaryTerm() throws Exception {
164165
assertThat(dataNodes.size(), greaterThanOrEqualTo(2));
165166
final DiscoveryNode[] discoveryNodes = dataNodes.values().toArray(DiscoveryNode.class);
166167
final String mergeNode = discoveryNodes[0].getName();
167-
ensureGreen();
168+
// This needs more than the default timeout if 210(2*3*5*7) shards were created.
169+
ensureGreen(TimeValue.timeValueSeconds(120));
168170

169171
// fail random primary shards to force primary terms to increase
170172
final Index source = resolveIndex("source");

0 commit comments

Comments
 (0)