[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");
|
logger.info("--> start 2 nodes");
|
||||||
Client client = client();
|
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();
|
ensureGreen();
|
||||||
|
|
||||||
logger.info("--> indexing some data");
|
logger.info("--> indexing some data");
|
||||||
|
@ -149,7 +149,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
||||||
nodes.add(internalCluster().startNode());
|
nodes.add(internalCluster().startNode());
|
||||||
Client client = client();
|
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();
|
ensureGreen();
|
||||||
|
|
||||||
logger.info("--> indexing some data");
|
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");
|
logger.info("--> create an index that will have some unallocated shards");
|
||||||
assertAcked(prepareCreate("test-idx-some", 2, settingsBuilder().put("number_of_shards", 6)
|
assertAcked(prepareCreate("test-idx-some", 2, settingsBuilder().put("number_of_shards", 6)
|
||||||
.put("number_of_replicas", 0)
|
.put("number_of_replicas", 0)));
|
||||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)
|
|
||||||
.put(MockDirectoryHelper.RANDOM_PREVENT_DOUBLE_WRITE, false)));
|
|
||||||
ensureGreen();
|
ensureGreen();
|
||||||
|
|
||||||
logger.info("--> indexing some data into test-idx-some");
|
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");
|
logger.info("--> create an index that will have all allocated shards");
|
||||||
assertAcked(prepareCreate("test-idx-all", 1, settingsBuilder().put("number_of_shards", 6)
|
assertAcked(prepareCreate("test-idx-all", 1, settingsBuilder().put("number_of_shards", 6)
|
||||||
.put("number_of_replicas", 0)
|
.put("number_of_replicas", 0)));
|
||||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
|
||||||
ensureGreen("test-idx-all");
|
ensureGreen("test-idx-all");
|
||||||
|
|
||||||
logger.info("--> indexing some data into 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");
|
logger.info("--> create an index that will have no allocated shards");
|
||||||
assertAcked(prepareCreate("test-idx-none", 1, settingsBuilder().put("number_of_shards", 6)
|
assertAcked(prepareCreate("test-idx-none", 1, settingsBuilder().put("number_of_shards", 6)
|
||||||
.put("index.routing.allocation.include.tag", "nowhere")
|
.put("index.routing.allocation.include.tag", "nowhere")
|
||||||
.put("number_of_replicas", 0)
|
.put("number_of_replicas", 0)));
|
||||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
|
||||||
|
|
||||||
logger.info("--> create repository");
|
logger.info("--> create repository");
|
||||||
logger.info("--> creating repository");
|
logger.info("--> creating repository");
|
||||||
|
@ -456,8 +452,7 @@ public class DedicatedClusterSnapshotRestoreTests extends AbstractSnapshotTests
|
||||||
|
|
||||||
private void createTestIndex(String name) {
|
private void createTestIndex(String name) {
|
||||||
assertAcked(prepareCreate(name, 0, settingsBuilder().put("number_of_shards", between(1, 6))
|
assertAcked(prepareCreate(name, 0, settingsBuilder().put("number_of_shards", between(1, 6))
|
||||||
.put("number_of_replicas", between(1, 6))
|
.put("number_of_replicas", between(1, 6))));
|
||||||
.put(MockDirectoryHelper.RANDOM_NO_DELETE_OPEN_FILE, false)));
|
|
||||||
|
|
||||||
ensureYellow(name);
|
ensureYellow(name);
|
||||||
|
|
||||||
|
|
|
@ -62,16 +62,6 @@ import static org.hamcrest.Matchers.*;
|
||||||
@Slow
|
@Slow
|
||||||
public class SharedClusterSnapshotRestoreTests extends AbstractSnapshotTests {
|
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
|
@Test
|
||||||
public void basicWorkFlowTest() throws Exception {
|
public void basicWorkFlowTest() throws Exception {
|
||||||
Client client = client();
|
Client client = client();
|
||||||
|
|
Loading…
Reference in New Issue