pass on node seed to the node level settings in TestCluster
This commit is contained in:
parent
49d0ced16c
commit
602c63d2aa
|
@ -99,6 +99,12 @@ public final class TestCluster implements Iterable<Client> {
|
||||||
*/
|
*/
|
||||||
public static final String TESTS_ENABLE_MOCK_MODULES = "tests.enable_mock_modules";
|
public static final String TESTS_ENABLE_MOCK_MODULES = "tests.enable_mock_modules";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A node level setting that holds a per node random seed that is consistent across node restarts
|
||||||
|
*/
|
||||||
|
public static final String SETTING_CLUSTER_NODE_SEED = "test.cluster.node.seed";
|
||||||
|
|
||||||
|
|
||||||
private static final boolean ENABLE_MOCK_MODULES = systemPropertyAsBoolean(TESTS_ENABLE_MOCK_MODULES, true);
|
private static final boolean ENABLE_MOCK_MODULES = systemPropertyAsBoolean(TESTS_ENABLE_MOCK_MODULES, true);
|
||||||
|
|
||||||
private static long clusterSeed() {
|
private static long clusterSeed() {
|
||||||
|
@ -205,7 +211,8 @@ public final class TestCluster implements Iterable<Client> {
|
||||||
// decrease the routing schedule so new nodes will be added quickly - some random value between 30 and 80 ms
|
// decrease the routing schedule so new nodes will be added quickly - some random value between 30 and 80 ms
|
||||||
.put("cluster.routing.schedule", (30 + random.nextInt(50)) + "ms")
|
.put("cluster.routing.schedule", (30 + random.nextInt(50)) + "ms")
|
||||||
// default to non gateway
|
// default to non gateway
|
||||||
.put("gateway.type", "none");
|
.put("gateway.type", "none")
|
||||||
|
.put(SETTING_CLUSTER_NODE_SEED, seed);
|
||||||
if (ENABLE_MOCK_MODULES && usually(random)) {
|
if (ENABLE_MOCK_MODULES && usually(random)) {
|
||||||
builder.put("index.store.type", MockFSIndexStoreModule.class.getName()); // no RAM dir for now!
|
builder.put("index.store.type", MockFSIndexStoreModule.class.getName()); // no RAM dir for now!
|
||||||
builder.put(IndexEngineModule.EngineSettings.ENGINE_TYPE, MockEngineModule.class.getName());
|
builder.put(IndexEngineModule.EngineSettings.ENGINE_TYPE, MockEngineModule.class.getName());
|
||||||
|
|
Loading…
Reference in New Issue