[TEST] Ensure that all flushes happen on PeerRecovery tests
This commit is contained in:
parent
c630b1e8a4
commit
ade5aaae5f
|
@ -34,7 +34,6 @@ import org.elasticsearch.indices.recovery.RecoveryState;
|
||||||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||||
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
|
import org.elasticsearch.test.ElasticsearchIntegrationTest.ClusterScope;
|
||||||
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
|
import org.elasticsearch.test.InternalTestCluster.RestartCallback;
|
||||||
import org.elasticsearch.test.junit.annotations.TestLogging;
|
|
||||||
import org.elasticsearch.test.store.MockDirectoryHelper;
|
import org.elasticsearch.test.store.MockDirectoryHelper;
|
||||||
import org.elasticsearch.test.store.MockFSDirectoryService;
|
import org.elasticsearch.test.store.MockFSDirectoryService;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
@ -363,10 +362,13 @@ public class SimpleRecoveryLocalGatewayTests extends ElasticsearchIntegrationTes
|
||||||
client().admin().indices().prepareFlush().execute().actionGet();
|
client().admin().indices().prepareFlush().execute().actionGet();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
client().admin().indices().prepareFlush().execute().actionGet();
|
if (randomBoolean()) {
|
||||||
|
client().admin().indices().prepareFlush().execute().actionGet();
|
||||||
|
}
|
||||||
logger.info("Running Cluster Health");
|
logger.info("Running Cluster Health");
|
||||||
ensureGreen();
|
ensureGreen();
|
||||||
|
client().admin().indices().prepareOptimize("test").setWaitForMerge(true).setMaxNumSegments(100).get(); // just wait for merges
|
||||||
|
client().admin().indices().prepareFlush().setWaitIfOngoing(true).setForce(true).execute().actionGet();
|
||||||
|
|
||||||
logger.info("--> shutting down the nodes");
|
logger.info("--> shutting down the nodes");
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue