[TEST] Force flush to ensure multiple segments.
Relates to
package org.elasticsearch.xpack.ccr.action;
import org.elasticsearch.ElasticsearchException;
+import org.elasticsearch.action.admin.indices.flush.FlushRequest;
import org.elasticsearch.action.admin.indices.forcemerge.ForceMergeRequest;
import org.elasticsearch.action.admin.indices.refresh.RefreshRequest;
import org.elasticsearch.action.admin.indices.stats.ShardStats;
@@ -99,6 +100,7 @@ public class ShardChangesTests extends ESSingleNodeTestCase {
for (int i = 0; i < 32; i++) {
client().prepareIndex("index", "_doc", "1").setSource("{}", XContentType.JSON).get();
client().prepareDelete("index", "_doc", "1").get();
+ client().admin().indices().flush(new FlushRequest("index").force(true)).actionGet();
}
client().admin().indices().refresh(new RefreshRequest("index")).actionGet();
ForceMergeRequest forceMergeRequest = new ForceMergeRequest("index");
