Skip to content

Commit 8b38e9f

Browse files
authored
Ensure index is green after closing in test (#47541)
This test was less stable following a backport as the shards in these indices did not always show up as allocated immediately after closing them. This ensures those shards have stabilized before trying to roll over.
1 parent 07ed3d5 commit 8b38e9f

File tree

1 file changed

+1
-0
lines changed
  • server/src/test/java/org/elasticsearch/action/admin/indices/rollover

1 file changed

+1
-0
lines changed

server/src/test/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ public void testRolloverWithClosedWriteIndex() throws Exception {
423423

424424
assertAcked(client().admin().indices().prepareClose(closedIndex).get());
425425
assertAcked(client().admin().indices().prepareClose(writeIndexPrefix + "000001").get());
426+
ensureGreen(aliasName);
426427

427428
RolloverResponse rolloverResponse = client().admin().indices().prepareRolloverIndex(aliasName)
428429
.addMaxIndexDocsCondition(1)

0 commit comments

Comments
 (0)