From 1b7920f20228cd9524a715e38fc26d1a625ec38e Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Fri, 6 Feb 2015 12:50:25 +0100 Subject: [PATCH] Test: add document indexing back to testCancellationCleansTempFiles It was lost during a merge conflict in 796aa5c3fe2424390a8edee604cd292b8afdf514 --- .../java/org/elasticsearch/recovery/RelocationTests.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/test/java/org/elasticsearch/recovery/RelocationTests.java b/src/test/java/org/elasticsearch/recovery/RelocationTests.java index a4036c41402..31e3edb7a19 100644 --- a/src/test/java/org/elasticsearch/recovery/RelocationTests.java +++ b/src/test/java/org/elasticsearch/recovery/RelocationTests.java @@ -542,6 +542,13 @@ public class RelocationTests extends ElasticsearchIntegrationTest { .setSettings(ImmutableSettings.builder().put(IndexMetaData.SETTING_NUMBER_OF_SHARDS, 1, IndexMetaData.SETTING_NUMBER_OF_REPLICAS, 0)).get(); internalCluster().startNodesAsync(2).get(); + + List requests = new ArrayList<>(); + int numDocs = scaledRandomIntBetween(25, 250); + for (int i = 0; i < numDocs; i++) { + requests.add(client().prepareIndex(indexName, "type").setCreate(true).setSource("{}")); + } + indexRandom(true, requests); assertFalse(client().admin().cluster().prepareHealth().setWaitForNodes("3").setWaitForGreenStatus().get().isTimedOut()); flush();