Browse Source

[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.
Yannick Welsch 8 years ago
parent
commit
e3aa2a89f9

+ 1 - 0
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[0]);
         Files.createDirectories(multiDataPath[1]);
         Files.createDirectories(multiDataPath[1]);
         logger.info("--> Multi data paths: {}, {}", multiDataPath[0], multiDataPath[1]);
         logger.info("--> Multi data paths: {}, {}", multiDataPath[0], multiDataPath[1]);
+        ensureGreen();
     }
     }
 
 
     void upgradeIndexFolder() throws Exception {
     void upgradeIndexFolder() throws Exception {