Skip to content

Commit 5c41bd2

Browse files
committed
Test: Not all shards maybe in a started state after the initial scroll search, but are after we do the stats call, so add ensureGreen to ensure we don't up with this discrepancy
1 parent 7535248 commit 5c41bd2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/test/java/org/elasticsearch/search/stats/SearchStatsTests.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ private Set<String> nodeIdsWithIndex(String... indices) {
151151
@Test
152152
public void testOpenContexts() {
153153
createIndex("test1");
154+
ensureGreen("test1");
154155
final int docs = scaledRandomIntBetween(20, 50);
155156
for (int i = 0; i < docs; i++) {
156157
client().prepareIndex("test1", "type", Integer.toString(i)).setSource("field", "value").execute().actionGet();

0 commit comments

Comments
 (0)