[TEST] Make sure refresh is called by `indexRandom`, even if the list of documents to index is empty.

This commit is contained in:
Adrien Grand 2014-04-03 15:57:54 +02:00
parent 6f0904c7f1
commit c78bb4472a
1 changed files with 0 additions and 4 deletions

View File

@ -749,10 +749,6 @@ public abstract class ElasticsearchIntegrationTest extends ElasticsearchTestCase
* layout. * layout.
*/ */
public void indexRandom(boolean forceRefresh, List<IndexRequestBuilder> builders) throws InterruptedException, ExecutionException { public void indexRandom(boolean forceRefresh, List<IndexRequestBuilder> builders) throws InterruptedException, ExecutionException {
if (builders.size() == 0) {
return;
}
Random random = getRandom(); Random random = getRandom();
Set<String> indicesSet = new HashSet<>(); Set<String> indicesSet = new HashSet<>();
for (IndexRequestBuilder builder : builders) { for (IndexRequestBuilder builder : builders) {