From dfc2c9f3a12d6c184cee54f7d09746872b127795 Mon Sep 17 00:00:00 2001 From: Ryan Ernst Date: Fri, 23 Jan 2015 13:59:42 -0800 Subject: [PATCH] Tests: Tweaking static bwc tests to improve stability --- .../bwcompat/OldIndexBackwardsCompatibilityTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java b/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java index da2171da1ff..f2f026fb846 100644 --- a/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java +++ b/src/test/java/org/elasticsearch/bwcompat/OldIndexBackwardsCompatibilityTests.java @@ -126,7 +126,6 @@ public class OldIndexBackwardsCompatibilityTests extends StaticIndexBackwardComp public void testOldIndexes() throws Exception { Collections.shuffle(indexes, getRandom()); for (String index : indexes) { - logMemoryStats(); logger.info("Testing old index " + index); assertOldIndexWorks(index); } @@ -137,6 +136,7 @@ public class OldIndexBackwardsCompatibilityTests extends StaticIndexBackwardComp .put(InternalNode.HTTP_ENABLED, true) // for _upgrade .build(); loadIndex(index, settings); + logMemoryStats(); assertBasicSearchWorks(); assertRealtimeGetWorks(); assertNewReplicasWork(); @@ -193,7 +193,7 @@ public class OldIndexBackwardsCompatibilityTests extends StaticIndexBackwardComp .put(InternalNode.HTTP_ENABLED, true) // for _upgrade .build()); } - ensureGreen("test"); + client().admin().cluster().prepareHealth("test").setWaitForNodes("" + (numReplicas + 1)); assertAcked(client().admin().indices().prepareUpdateSettings("test").setSettings(ImmutableSettings.builder() .put("number_of_replicas", numReplicas)).execute().actionGet()); // This can take a while when the number of replicas is greater than cluster.routing.allocation.node_concurrent_recoveries