[test] don't call optimize while shard is relocating

In this test we assume that after waitForRelocation() has returned shards
are no more relocated and optimize will therefore succeed always.
However, because the test does not wait for green status, relocations can
still start after waitForRelocation() has returned successfully.

see #13266 for a detailed explanation
This commit is contained in:
Britta Weber 2015-09-02 19:10:32 +02:00
parent 1a8a2c9bc2
commit d47857b66f
1 changed files with 1 additions and 1 deletions

View File

@ -143,7 +143,7 @@ public class SearchQueryIT extends ESIntegTestCase {
client().prepareIndex("test", "type1", "1").setSource("field1", "value1").get();
client().prepareIndex("test", "type1", "2").setSource("field1", "value2").get();
client().prepareIndex("test", "type1", "3").setSource("field1", "value3").get();
ensureGreen();
waitForRelocation();
optimize();
refresh();