mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 14:26:27 +00:00
testRestorePersistentSettings doesn't to mess with discovery settings
This commit is contained in:
parent
55a3fd1919
commit
40eb68c95a
@ -21,7 +21,6 @@ package org.elasticsearch.snapshots;
|
|||||||
|
|
||||||
import com.carrotsearch.hppc.IntHashSet;
|
import com.carrotsearch.hppc.IntHashSet;
|
||||||
import com.carrotsearch.hppc.IntSet;
|
import com.carrotsearch.hppc.IntSet;
|
||||||
|
|
||||||
import org.elasticsearch.action.ListenableActionFuture;
|
import org.elasticsearch.action.ListenableActionFuture;
|
||||||
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse;
|
import org.elasticsearch.action.admin.cluster.repositories.put.PutRepositoryResponse;
|
||||||
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
|
import org.elasticsearch.action.admin.cluster.snapshots.create.CreateSnapshotResponse;
|
||||||
@ -55,7 +54,6 @@ import org.elasticsearch.common.unit.TimeValue;
|
|||||||
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
import org.elasticsearch.common.xcontent.NamedXContentRegistry;
|
||||||
import org.elasticsearch.common.xcontent.XContentParser;
|
import org.elasticsearch.common.xcontent.XContentParser;
|
||||||
import org.elasticsearch.discovery.zen.ElectMasterService;
|
import org.elasticsearch.discovery.zen.ElectMasterService;
|
||||||
import org.elasticsearch.discovery.zen.ZenDiscovery;
|
|
||||||
import org.elasticsearch.indices.recovery.RecoveryState;
|
import org.elasticsearch.indices.recovery.RecoveryState;
|
||||||
import org.elasticsearch.node.Node;
|
import org.elasticsearch.node.Node;
|
||||||
import org.elasticsearch.plugins.Plugin;
|
import org.elasticsearch.plugins.Plugin;
|
||||||
@ -150,14 +148,9 @@ public class DedicatedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTest
|
|||||||
|
|
||||||
public void testRestorePersistentSettings() throws Exception {
|
public void testRestorePersistentSettings() throws Exception {
|
||||||
logger.info("--> start 2 nodes");
|
logger.info("--> start 2 nodes");
|
||||||
Settings nodeSettings = Settings.builder()
|
internalCluster().startNode();
|
||||||
.put("discovery.type", "zen")
|
|
||||||
.put(ZenDiscovery.PING_TIMEOUT_SETTING.getKey(), "200ms")
|
|
||||||
.put("discovery.initial_state_timeout", "500ms")
|
|
||||||
.build();
|
|
||||||
internalCluster().startNode(nodeSettings);
|
|
||||||
Client client = client();
|
Client client = client();
|
||||||
String secondNode = internalCluster().startNode(nodeSettings);
|
String secondNode = internalCluster().startNode();
|
||||||
logger.info("--> wait for the second node to join the cluster");
|
logger.info("--> wait for the second node to join the cluster");
|
||||||
assertThat(client.admin().cluster().prepareHealth().setWaitForNodes("2").get().isTimedOut(), equalTo(false));
|
assertThat(client.admin().cluster().prepareHealth().setWaitForNodes("2").get().isTimedOut(), equalTo(false));
|
||||||
|
|
||||||
|
@ -595,7 +595,7 @@ public final class InternalTestCluster extends TestCluster {
|
|||||||
"min master nodes may not be set when auto managed";
|
"min master nodes may not be set when auto managed";
|
||||||
assert finalSettings.get(INITIAL_STATE_TIMEOUT_SETTING.getKey()) == null :
|
assert finalSettings.get(INITIAL_STATE_TIMEOUT_SETTING.getKey()) == null :
|
||||||
"automatically managing min master nodes require nodes to complete a join cycle" +
|
"automatically managing min master nodes require nodes to complete a join cycle" +
|
||||||
"when starting";
|
" when starting";
|
||||||
finalSettings
|
finalSettings
|
||||||
// don't wait too long not to slow down tests
|
// don't wait too long not to slow down tests
|
||||||
.put(ZenDiscovery.MASTER_ELECTION_WAIT_FOR_JOINS_TIMEOUT_SETTING.getKey(), "5s")
|
.put(ZenDiscovery.MASTER_ELECTION_WAIT_FOR_JOINS_TIMEOUT_SETTING.getKey(), "5s")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user