From dca57ef455e4e41a874704ba69376ba1ec305c63 Mon Sep 17 00:00:00 2001 From: Gordon Brown Date: Thu, 3 Oct 2019 16:37:02 -0600 Subject: [PATCH] Ensure index is green after closing in test 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. --- .../elasticsearch/action/admin/indices/rollover/RolloverIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/test/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java b/server/src/test/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java index 5846ebabc0e97..1cabb0020fe7b 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java +++ b/server/src/test/java/org/elasticsearch/action/admin/indices/rollover/RolloverIT.java @@ -423,6 +423,7 @@ public void testRolloverWithClosedWriteIndex() throws Exception { assertAcked(client().admin().indices().prepareClose(closedIndex).get()); assertAcked(client().admin().indices().prepareClose(writeIndexPrefix + "000001").get()); + ensureGreen(aliasName); RolloverResponse rolloverResponse = client().admin().indices().prepareRolloverIndex(aliasName) .addMaxIndexDocsCondition(1)