summaryrefslogtreecommitdiff
path: root/core/src/test/java/org/elasticsearch/recovery
diff options
context:
space:
mode:
authorBoaz Leskes <b.leskes@gmail.com>2016-12-06 12:06:15 +0100
committerGitHub <noreply@github.com>2016-12-06 12:06:15 +0100
commita7050b2d5634e5fd30aaab7a7c849f1f26b18fd7 (patch)
treeb37034fe3deb0ac879f0106201733fd7efad7af5 /core/src/test/java/org/elasticsearch/recovery
parenta02bc8ed1c71aa7e75a163d3dd75398cb5a2a55e (diff)
Remove `InternalTestCluster.startNode(s)Async` (#21846)
Since the removal of local discovery of #https://github.com/elastic/elasticsearch/pull/20960 we rely on minimum master nodes to be set in our test cluster. The settings is automatically managed by the cluster (by default) but current management doesn't work with concurrent single node async starting. On the other hand, with `MockZenPing` and the `discovery.initial_state_timeout` set to `0s` node starting and joining is very fast making async starting an unneeded complexity. Test that still need async starting could, in theory, still do so themselves via background threads. Note that this change also removes the usage of `INITIAL_STATE_TIMEOUT_SETTINGS` as the starting of nodes is done concurrently (but building them is sequential)
Diffstat (limited to 'core/src/test/java/org/elasticsearch/recovery')
-rw-r--r--core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java2
-rw-r--r--core/src/test/java/org/elasticsearch/recovery/RelocationIT.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java
index dc38867705..50035e1027 100644
--- a/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java
+++ b/core/src/test/java/org/elasticsearch/recovery/FullRollingRestartIT.java
@@ -126,7 +126,7 @@ public class FullRollingRestartIT extends ESIntegTestCase {
public void testNoRebalanceOnRollingRestart() throws Exception {
// see https://github.com/elastic/elasticsearch/issues/14387
internalCluster().startMasterOnlyNode(Settings.EMPTY);
- internalCluster().startDataOnlyNodesAsync(3).get();
+ internalCluster().startDataOnlyNodes(3);
/**
* We start 3 nodes and a dedicated master. Restart on of the data-nodes and ensure that we got no relocations.
* Yet we have 6 shards 0 replica so that means if the restarting node comes back both other nodes are subject
diff --git a/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java
index cd93a9fef2..2017b2796b 100644
--- a/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java
+++ b/core/src/test/java/org/elasticsearch/recovery/RelocationIT.java
@@ -470,7 +470,7 @@ public class RelocationIT extends ESIntegTestCase {
Stream.generate(() -> Settings.builder().put("node.attr.color", "blue").build()).limit(halfNodes),
Stream.generate(() -> Settings.builder().put("node.attr.color", "red").build()).limit(halfNodes)
).toArray(Settings[]::new);
- List<String> nodes = internalCluster().startNodesAsync(nodeSettings).get();
+ List<String> nodes = internalCluster().startNodes(nodeSettings);
String[] blueNodes = nodes.subList(0, halfNodes).stream().toArray(String[]::new);
String[] redNodes = nodes.subList(halfNodes, nodes.size()).stream().toArray(String[]::new);
logger.info("blue nodes: {}", (Object)blueNodes);