Browse Source

Fixed sporadic errors in SearchAfterIT: ack the create and index method calls in the search_after integ test

Jim Ferenczi 9 years ago
parent
commit
3bdb54e529

+ 2 - 3
core/src/test/java/org/elasticsearch/search/searchafter/SearchAfterIT.java

@@ -51,9 +51,8 @@ public class SearchAfterIT extends ESIntegTestCase {
     private static final int NUM_DOCS = 100;
 
     public void testsShouldFail() throws Exception {
-        client().admin().indices().prepareCreate("test").execute().actionGet();
-        client().prepareIndex("test", "type1", "0").setSource("field1", 0, "field2", "toto").execute().actionGet();
-        refresh();
+        createIndex("test");
+        indexRandom(true, client().prepareIndex("test", "type1", "0").setSource("field1", 0, "field2", "toto"));
 
         try {
             client().prepareSearch("test")