[TEST] Remove RANDOM_NO_DELETE_OPEN_FILE and RANDOM_PREVENT_DOUBLE_WRITE settings from snapshot/restore tests
This commit is contained in:
parent
b2b443130f
commit
67882d78aa
|
@ -100,7 +100,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
|||
logger.info("--> start 2 nodes");
|
||||
Client client = client();
|
||||
|
||||
assertAcked(prepareCreate("test-idx", 2, settingsBuilder().put("number_of_shards", 2).put("number_of_replicas", 0).put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
||||
assertAcked(prepareCreate("test-idx", 2, settingsBuilder().put("number_of_shards", 2).put("number_of_replicas", 0)));
|
||||
ensureGreen();
|
||||
|
||||
logger.info("--> indexing some data");
|
||||
|
@ -149,7 +149,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
|||
nodes.add(internalCluster().startNode());
|
||||
Client client = client();
|
||||
|
||||
assertAcked(prepareCreate("test-idx", 2, settingsBuilder().put("number_of_shards", 2).put("number_of_replicas", 0).put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
||||
assertAcked(prepareCreate("test-idx", 2, settingsBuilder().put("number_of_shards", 2).put("number_of_replicas", 0)));
|
||||
ensureGreen();
|
||||
|
||||
logger.info("--> indexing some data");
|
||||
|
@ -212,9 +212,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
|||
|
||||
logger.info("--> create an index that will have some unallocated shards");
|
||||
assertAcked(prepareCreate("test-idx-some", 2, settingsBuilder().put("number_of_shards", 6)
|
||||
.put("number_of_replicas", 0)
|
||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)
|
||||
.put(MockDirectoryHelper.RANDOM_PREVENT_DOUBLE_WRITE, false)));
|
||||
.put("number_of_replicas", 0)));
|
||||
ensureGreen();
|
||||
|
||||
logger.info("--> indexing some data into test-idx-some");
|
||||
|
@ -230,8 +228,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
|||
|
||||
logger.info("--> create an index that will have all allocated shards");
|
||||
assertAcked(prepareCreate("test-idx-all", 1, settingsBuilder().put("number_of_shards", 6)
|
||||
.put("number_of_replicas", 0)
|
||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
||||
.put("number_of_replicas", 0)));
|
||||
ensureGreen("test-idx-all");
|
||||
|
||||
logger.info("--> indexing some data into test-idx-all");
|
||||
|
@ -244,8 +241,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
|||
logger.info("--> create an index that will have no allocated shards");
|
||||
assertAcked(prepareCreate("test-idx-none", 1, settingsBuilder().put("number_of_shards", 6)
|
||||
.put("index.routing.allocation.include.tag", "nowhere")
|
||||
.put("number_of_replicas", 0)
|
||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
||||
.put("number_of_replicas", 0)));
|
||||
|
||||
logger.info("--> create repository");
|
||||
logger.info("--> creating repository");
|
||||
|
@ -456,8 +452,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
|||
|
||||
private void createTestIndex(String name) {
|
||||
assertAcked(prepareCreate(name, 0, settingsBuilder().put("number_of_shards", between(1, 6))
|
||||
.put("number_of_replicas", between(1, 6))
|
||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
||||
.put("number_of_replicas", between(1, 6))));
|
||||
|
||||
ensureYellow(name);
|
||||
|
||||
|
|
|
@ -62,16 +62,6 @@ import static org.hamcrest.Matchers.*;
|
|||
@Slow
|
||||
public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests {
|
||||
|
||||
@Override
|
||||
public Settings indexSettings() {
|
||||
// During restore we frequently restore index to exactly the same state it was before, that might cause the same
|
||||
// checksum file to be written twice during restore operation
|
||||
return ImmutableSettings.builder().put(super.indexSettings())
|
||||
.put(MockDirectoryHelper.RANDOM_PREVENT_DOUBLE_WRITE, false)
|
||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false) //TODO: Ask Simon if this is hiding an issue
|
||||
.build();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void basicWorkFlowTest() throws Exception {
|
||||
Client client = client();
|
||||
|
|
Loading…
Reference in New Issue