From e3aa2a89f9f216dbd045b89b5bacd8da1fd9fe12 Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Fri, 14 Apr 2017 11:02:55 +0200 Subject: [PATCH] [TEST] Wait in OldIndexBackwardsCompatibilityIT for cluster to be fully initialized There are test failures that suggest that the import of dangling indices is happening too early, before the dangling indices are ready to be consumed. This commit adds an ensureGreen() at the end of cluster initialization to make sure that no cluster state updates are happening while the dangling indices are prepared on-disk. --- .../elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java index 1d6a634a877..11d42516331 100644 --- a/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java +++ b/core/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityIT.java @@ -166,6 +166,7 @@ public class OldIndexBackwardsCompatibilityIT extends ESIntegTestCase { Files.createDirectories(multiDataPath[0]); Files.createDirectories(multiDataPath[1]); logger.info("--> Multi data paths: {}, {}", multiDataPath[0], multiDataPath[1]); + ensureGreen(); } void upgradeIndexFolder() throws Exception {