From eff82fdbcd393ce7dc188513717c27e4973307a5 Mon Sep 17 00:00:00 2001 From: Boaz Leskes Date: Wed, 11 Nov 2015 10:19:41 +0100 Subject: [PATCH] Tests: update the disco node id seed on node restart To make sure the new node's id is changed. Closes #14675 --- .../java/org/elasticsearch/discovery/DiscoveryService.java | 4 +++- .../java/org/elasticsearch/test/InternalTestCluster.java | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java b/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java index 682fa99bb00..eeba9baa32a 100644 --- a/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java +++ b/core/src/main/java/org/elasticsearch/discovery/DiscoveryService.java @@ -39,6 +39,8 @@ import java.util.concurrent.TimeUnit; public class DiscoveryService extends AbstractLifecycleComponent { public static final String SETTING_INITIAL_STATE_TIMEOUT = "discovery.initial_state_timeout"; + public static final String SETTING_DISCOVERY_SEED = "discovery.id.seed"; + private static class InitialStateListener implements InitialStateDiscoveryListener { @@ -130,7 +132,7 @@ public class DiscoveryService extends AbstractLifecycleComponent> plugins = node.getPlugins(); Version version = node.getVersion(); node = new MockNode(finalSettings, version, plugins);