Test: always run CheckIndex for these two tests
This commit is contained in:
parent
509f71cd55
commit
7ca64237a8
|
@ -20,14 +20,16 @@ package org.elasticsearch.indices;
|
|||
|
||||
import org.elasticsearch.action.ActionListener;
|
||||
import org.elasticsearch.action.admin.indices.flush.FlushResponse;
|
||||
import org.elasticsearch.common.settings.ImmutableSettings;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||
import org.elasticsearch.test.store.MockFSDirectoryService;
|
||||
import org.junit.Test;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.concurrent.CopyOnWriteArrayList;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAllSuccessful;
|
||||
import static org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertAcked;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.emptyIterable;
|
||||
import static org.hamcrest.Matchers.equalTo;
|
||||
|
@ -36,7 +38,10 @@ public class FlushTest extends ElasticsearchIntegrationTest {
|
|||
|
||||
@Test
|
||||
public void testWaitIfOngoing() throws InterruptedException {
|
||||
createIndex("test");
|
||||
assertAcked(client().admin().indices().prepareCreate("test").setSettings(
|
||||
ImmutableSettings.settingsBuilder()
|
||||
// Always run CheckIndex in the end:
|
||||
.put(MockFSDirectoryService.CHECK_INDEX_ON_CLOSE, true).build()));
|
||||
ensureGreen("test");
|
||||
final int numIters = scaledRandomIntBetween(10, 30);
|
||||
for (int i = 0; i < numIters; i++) {
|
||||
|
|
|
@ -42,6 +42,7 @@ import org.elasticsearch.index.engine.DocumentAlreadyExistsException;
|
|||
import org.elasticsearch.index.engine.FlushNotAllowedEngineException;
|
||||
import org.elasticsearch.index.engine.VersionConflictEngineException;
|
||||
import org.elasticsearch.test.ElasticsearchIntegrationTest;
|
||||
import org.elasticsearch.test.store.MockFSDirectoryService;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.elasticsearch.index.query.QueryBuilders.matchAllQuery;
|
||||
|
@ -525,7 +526,10 @@ public class SimpleVersioningTests extends ElasticsearchIntegrationTest {
|
|||
@Test
|
||||
@Slow
|
||||
public void testRandomIDsAndVersions() throws Exception {
|
||||
createIndex("test");
|
||||
assertAcked(client().admin().indices().prepareCreate("test").setSettings(
|
||||
ImmutableSettings.settingsBuilder()
|
||||
// Always run CheckIndex in the end:
|
||||
.put(MockFSDirectoryService.CHECK_INDEX_ON_CLOSE, true).build()));
|
||||
ensureGreen();
|
||||
|
||||
// TODO: sometimes use _bulk API
|
||||
|
|
Loading…
Reference in New Issue