Merge branch 'master' into shield-kibana-auth
Original commit: elastic/x-pack-elasticsearch@cb77a17842
This commit is contained in:
commit
eb7c323796
|
@ -49,7 +49,7 @@ public class LicenseSerializationTests extends ESTestCase {
|
|||
XContentBuilder builder = XContentFactory.contentBuilder(XContentType.JSON);
|
||||
license.toXContent(builder, new ToXContent.MapParams(Collections.singletonMap(License.REST_VIEW_MODE, "true")));
|
||||
builder.flush();
|
||||
Map<String, Object> map = XContentHelper.convertToMap(builder.bytesStream().bytes(), false).v2();
|
||||
Map<String, Object> map = XContentHelper.convertToMap(builder.bytes(), false).v2();
|
||||
|
||||
// should have an extra status field, human readable issue_data and expiry_date
|
||||
assertThat(map.get("status"), notNullValue());
|
||||
|
@ -59,14 +59,14 @@ public class LicenseSerializationTests extends ESTestCase {
|
|||
builder = XContentFactory.contentBuilder(XContentType.JSON);
|
||||
license.toXContent(builder, ToXContent.EMPTY_PARAMS);
|
||||
builder.flush();
|
||||
map = XContentHelper.convertToMap(builder.bytesStream().bytes(), false).v2();
|
||||
map = XContentHelper.convertToMap(builder.bytes(), false).v2();
|
||||
assertThat(map.get("status"), nullValue());
|
||||
|
||||
license = TestUtils.generateLicenses(new TestUtils.LicenseSpec(validLicenseIssueDate, validLicenseExpiryDate));
|
||||
builder = XContentFactory.contentBuilder(XContentType.JSON);
|
||||
license.toXContent(builder, new ToXContent.MapParams(Collections.singletonMap(License.REST_VIEW_MODE, "true")));
|
||||
builder.flush();
|
||||
map = XContentHelper.convertToMap(builder.bytesStream().bytes(), false).v2();
|
||||
map = XContentHelper.convertToMap(builder.bytes(), false).v2();
|
||||
|
||||
// should have an extra status field, human readable issue_data and expiry_date
|
||||
assertThat(map.get("status"), notNullValue());
|
||||
|
@ -76,14 +76,14 @@ public class LicenseSerializationTests extends ESTestCase {
|
|||
builder = XContentFactory.contentBuilder(XContentType.JSON);
|
||||
license.toXContent(builder, ToXContent.EMPTY_PARAMS);
|
||||
builder.flush();
|
||||
map = XContentHelper.convertToMap(builder.bytesStream().bytes(), false).v2();
|
||||
map = XContentHelper.convertToMap(builder.bytes(), false).v2();
|
||||
assertThat(map.get("status"), nullValue());
|
||||
|
||||
license = TestUtils.generateLicenses(new TestUtils.LicenseSpec(invalidLicenseIssueDate, validLicenseExpiryDate));
|
||||
builder = XContentFactory.contentBuilder(XContentType.JSON);
|
||||
license.toXContent(builder, new ToXContent.MapParams(Collections.singletonMap(License.REST_VIEW_MODE, "true")));
|
||||
builder.flush();
|
||||
map = XContentHelper.convertToMap(builder.bytesStream().bytes(), false).v2();
|
||||
map = XContentHelper.convertToMap(builder.bytes(), false).v2();
|
||||
|
||||
// should have an extra status field, human readable issue_data and expiry_date
|
||||
assertThat(map.get("status"), notNullValue());
|
||||
|
@ -93,7 +93,7 @@ public class LicenseSerializationTests extends ESTestCase {
|
|||
builder = XContentFactory.contentBuilder(XContentType.JSON);
|
||||
license.toXContent(builder, ToXContent.EMPTY_PARAMS);
|
||||
builder.flush();
|
||||
map = XContentHelper.convertToMap(builder.bytesStream().bytes(), false).v2();
|
||||
map = XContentHelper.convertToMap(builder.bytes(), false).v2();
|
||||
assertThat(map.get("status"), nullValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ integTest {
|
|||
'bin/x-pack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin'
|
||||
waitCondition = { node, ant ->
|
||||
File tmpFile = new File(node.cwd, 'wait.success')
|
||||
ant.get(src: "http://localhost:${node.httpPort()}",
|
||||
ant.get(src: "http://${node.httpUri()}",
|
||||
dest: tmpFile.toString(),
|
||||
username: 'test_user',
|
||||
password: 'changeme',
|
||||
|
|
|
@ -13,7 +13,7 @@ integTest {
|
|||
'bin/x-pack/esusers', 'useradd', 'transport', '-p', 'changeme', '-r', 'transport_client'
|
||||
waitCondition = { node, ant ->
|
||||
File tmpFile = new File(node.cwd, 'wait.success')
|
||||
ant.get(src: "http://localhost:${node.httpPort()}",
|
||||
ant.get(src: "http://${node.httpUri()}",
|
||||
dest: tmpFile.toString(),
|
||||
username: 'test_user',
|
||||
password: 'changeme',
|
||||
|
|
|
@ -37,7 +37,7 @@ integTest {
|
|||
'bin/x-pack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin'
|
||||
waitCondition = { node, ant ->
|
||||
File tmpFile = new File(node.cwd, 'wait.success')
|
||||
ant.get(src: "http://localhost:${node.httpPort()}",
|
||||
ant.get(src: "http://${node.httpUri()}",
|
||||
dest: tmpFile.toString(),
|
||||
username: 'test_user',
|
||||
password: 'changeme',
|
||||
|
|
|
@ -26,7 +26,7 @@ integTest {
|
|||
'bin/x-pack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin'
|
||||
waitCondition = { node, ant ->
|
||||
File tmpFile = new File(node.cwd, 'wait.success')
|
||||
ant.get(src: "http://localhost:${node.httpPort()}",
|
||||
ant.get(src: "http://${node.httpUri()}",
|
||||
dest: tmpFile.toString(),
|
||||
username: 'test_user',
|
||||
password: 'changeme',
|
||||
|
|
|
@ -18,6 +18,23 @@ task createKey(type: LoggedExec) {
|
|||
project.delete(keystore.parentFile)
|
||||
keystore.parentFile.mkdirs()
|
||||
}
|
||||
String subjectAlternateNames = 'san=dns:localhost,ip:127.0.0.1'
|
||||
// some machines have a different name for ipv6 loopback,
|
||||
// at least on ubuntu its ip6-localhost. other machines, like windows,
|
||||
// won't resolve it back to any hostname at all. Try to setup ipv6 to
|
||||
// work in all cases.
|
||||
try {
|
||||
String localhost6 = InetAddress.getByName("::1").getCanonicalHostName()
|
||||
if (!localhost6.equals("localhost")) {
|
||||
if (localhost6.startsWith("0")) {
|
||||
subjectAlternateNames += ",ip:" + localhost6
|
||||
} else {
|
||||
subjectAlternateNames += ",dns:" + localhost6
|
||||
}
|
||||
}
|
||||
} catch (UnknownHostException ok) {
|
||||
// e.g. no ipv6 support
|
||||
}
|
||||
executable = 'keytool'
|
||||
standardInput = new ByteArrayInputStream('FirstName LastName\nUnit\nOrganization\nCity\nState\nNL\nyes\n\n'.getBytes('UTF-8'))
|
||||
args '-genkey',
|
||||
|
@ -26,7 +43,7 @@ task createKey(type: LoggedExec) {
|
|||
'-keyalg', 'RSA',
|
||||
'-keysize', '2048',
|
||||
'-validity', '712',
|
||||
'-ext', 'san=dns:localhost,ip:127.0.0.1',
|
||||
'-ext', subjectAlternateNames,
|
||||
'-storepass', 'keypass'
|
||||
}
|
||||
|
||||
|
@ -43,8 +60,6 @@ project.rootProject.subprojects.findAll { it.path.startsWith(':plugins:') }.each
|
|||
|
||||
integTest {
|
||||
cluster {
|
||||
// TODO: use some variable here for port number
|
||||
systemProperty 'es.marvel.agent.exporter.es.hosts', 'https://marvel_export:changeme@localhost:9400'
|
||||
systemProperty 'es.marvel.agent.exporter.es.ssl.truststore.path', keystore.name
|
||||
systemProperty 'es.marvel.agent.exporter.es.ssl.truststore.password', 'keypass'
|
||||
systemProperty 'es.shield.transport.ssl', 'true'
|
||||
|
|
|
@ -21,7 +21,7 @@ integTest {
|
|||
'bin/x-pack/esusers', 'useradd', 'test_user', '-p', 'changeme', '-r', 'admin'
|
||||
waitCondition = { node, ant ->
|
||||
File tmpFile = new File(node.cwd, 'wait.success')
|
||||
ant.get(src: "http://localhost:${node.httpPort()}",
|
||||
ant.get(src: "http://${node.httpUri()}",
|
||||
dest: tmpFile.toString(),
|
||||
username: 'test_user',
|
||||
password: 'changeme',
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
package org.elasticsearch.watcher.test.rest;
|
||||
package org.elasticsearch.smoketest;
|
||||
|
||||
import com.carrotsearch.randomizedtesting.annotations.Name;
|
||||
import com.carrotsearch.randomizedtesting.annotations.ParametersFactory;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* or more contributor license agreements. Licensed under the Elastic License;
|
||||
* you may not use this file except in compliance with the Elastic License.
|
||||
*/
|
||||
package org.elasticsearch.watcher.test.rest;
|
||||
package org.elasticsearch.smoketest;
|
||||
|
||||
import org.elasticsearch.test.rest.RestTestCandidate;
|
||||
|
||||
|
|
|
@ -15,7 +15,8 @@ integTest {
|
|||
dependsOn copyWatcherRestTests
|
||||
systemProperty 'tests.rest.blacklist',
|
||||
['hijack/10_basic/*',
|
||||
'array_compare_watch/10_basic/Basic array_compare watch'].join(',')
|
||||
'array_compare_watch/10_basic/Basic array_compare watch',
|
||||
'getting_started/10_monitor_cluster_health/Getting started - Monitor cluster health'].join(',')
|
||||
|
||||
cluster {
|
||||
plugin 'x-pack', project(':x-plugins:elasticsearch:x-pack')
|
||||
|
@ -28,7 +29,7 @@ integTest {
|
|||
'bin/x-pack/esusers', 'useradd', 'powerless_user', '-p', 'changeme', '-r', 'crapy_role'
|
||||
waitCondition = { node, ant ->
|
||||
File tmpFile = new File(node.cwd, 'wait.success')
|
||||
ant.get(src: "http://localhost:${node.httpPort()}",
|
||||
ant.get(src: "http://${node.httpUri()}",
|
||||
dest: tmpFile.toString(),
|
||||
username: 'test_admin',
|
||||
password: 'changeme',
|
||||
|
|
|
@ -70,7 +70,6 @@ compileTestJava.options.compilerArgs << "-Xlint:-deprecation,-rawtypes,-serial,-
|
|||
|
||||
ext.expansions = [
|
||||
'project.version': version,
|
||||
'integ.http.port': integTest.cluster.baseHttpPort
|
||||
]
|
||||
|
||||
processResources {
|
||||
|
@ -117,12 +116,14 @@ bundlePlugin {
|
|||
from('watcher/bin/watcher') {
|
||||
into 'bin'
|
||||
}
|
||||
}
|
||||
|
||||
integTest {
|
||||
cluster {
|
||||
// TODO set up tests so that shield can be enabled or disabled
|
||||
systemProperty 'es.shield.enabled', 'false'
|
||||
}
|
||||
integTest {
|
||||
// TODO: fix this rest test to not depend on a hardcoded port!
|
||||
systemProperty 'tests.rest.blacklist', 'getting_started/10_monitor_cluster_health/*'
|
||||
cluster {
|
||||
// TODO set up tests so that shield can be enabled or disabled
|
||||
systemProperty 'es.shield.enabled', 'false'
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ public class PutLicenseResponseTests extends ESTestCase {
|
|||
response.toXContent(contentBuilder, ToXContent.EMPTY_PARAMS);
|
||||
contentBuilder.endObject();
|
||||
|
||||
Map<String, Object> map = XContentHelper.convertToMap(contentBuilder.bytesStream().bytes(), false).v2();
|
||||
Map<String, Object> map = XContentHelper.convertToMap(contentBuilder.bytes(), false).v2();
|
||||
assertThat(map.containsKey("acknowledged"), equalTo(true));
|
||||
boolean actualAcknowledged = (boolean) map.get("acknowledged");
|
||||
assertThat(actualAcknowledged, equalTo(acknowledged));
|
||||
|
|
|
@ -199,18 +199,15 @@ public class HttpExporter extends Exporter {
|
|||
}
|
||||
builder.endObject();
|
||||
builder.endObject();
|
||||
|
||||
// Adds action metadata line bulk separator
|
||||
builder.flush(); // Flush is needed here because the separator is written directly in the builder's stream
|
||||
builder.stream().write(builder.contentType().xContent().streamSeparator());
|
||||
|
||||
// Render the MarvelDoc
|
||||
renderer.render(marvelDoc, xContentType, out);
|
||||
|
||||
// Adds final bulk separator
|
||||
builder.flush();
|
||||
builder.stream().write(builder.contentType().xContent().streamSeparator());
|
||||
}
|
||||
// Adds action metadata line bulk separator
|
||||
out.write(xContentType.xContent().streamSeparator());
|
||||
|
||||
// Render the MarvelDoc
|
||||
renderer.render(marvelDoc, xContentType, out);
|
||||
|
||||
// Adds final bulk separator
|
||||
out.write(xContentType.xContent().streamSeparator());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
|
|
|
@ -61,7 +61,7 @@ public class ShieldActionMapperTests extends ESTestCase {
|
|||
}
|
||||
clearScrollRequest.addScrollId("_all");
|
||||
//make sure that wherever the _all is among the scroll ids the action name gets translated
|
||||
Collections.shuffle(clearScrollRequest.getScrollIds(), getRandom());
|
||||
Collections.shuffle(clearScrollRequest.getScrollIds(), random());
|
||||
|
||||
assertThat(shieldActionMapper.action(ClearScrollAction.NAME, clearScrollRequest), equalTo(ShieldActionMapper.CLUSTER_PERMISSION_SCROLL_CLEAR_ALL_NAME));
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ public class RealmsTests extends ESTestCase {
|
|||
for (int i = 0; i < factories.size() - 1; i++) {
|
||||
orders.add(i);
|
||||
}
|
||||
Collections.shuffle(orders, getRandom());
|
||||
Collections.shuffle(orders, random());
|
||||
Map<Integer, Integer> orderToIndex = new HashMap<>();
|
||||
for (int i = 0; i < factories.size() - 1; i++) {
|
||||
builder.put("shield.authc.realms.realm_" + i + ".type", "type_" + i);
|
||||
|
@ -118,7 +118,7 @@ public class RealmsTests extends ESTestCase {
|
|||
for (int i = 0; i < factories.size() - 1; i++) {
|
||||
orders.add(i);
|
||||
}
|
||||
Collections.shuffle(orders, getRandom());
|
||||
Collections.shuffle(orders, random());
|
||||
Map<Integer, Integer> orderToIndex = new HashMap<>();
|
||||
for (int i = 0; i < factories.size() - 1; i++) {
|
||||
builder.put("shield.authc.realms.realm_" + i + ".type", "type_" + i);
|
||||
|
@ -186,7 +186,7 @@ public class RealmsTests extends ESTestCase {
|
|||
for (int i = 0; i < factories.size() - 1; i++) {
|
||||
orders.add(i);
|
||||
}
|
||||
Collections.shuffle(orders, getRandom());
|
||||
Collections.shuffle(orders, random());
|
||||
Map<Integer, Integer> orderToIndex = new HashMap<>();
|
||||
for (int i = 0; i < factories.size() - 1; i++) {
|
||||
builder.put("shield.authc.realms.realm_" + i + ".type", "type_" + i);
|
||||
|
|
|
@ -8,11 +8,10 @@ package org.elasticsearch.shield.tribe;
|
|||
import org.apache.lucene.util.LuceneTestCase;
|
||||
import org.elasticsearch.Version;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
import org.elasticsearch.node.MockNode;
|
||||
import org.elasticsearch.node.Node;
|
||||
import org.elasticsearch.node.NodeBuilder;
|
||||
import org.elasticsearch.test.ESTestCase;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -42,7 +41,7 @@ public class TribeShieldLoadedTests extends ESTestCase {
|
|||
Settings.Builder builder = defaultSettings();
|
||||
|
||||
try {
|
||||
NodeBuilder.nodeBuilder().settings(builder.build()).build();
|
||||
new Node(builder.build());
|
||||
fail("node initialization should have failed due to missing shield plugin");
|
||||
} catch(Throwable t) {
|
||||
assertThat(t.getMessage(), containsString("Missing mandatory plugins [shield]"));
|
||||
|
@ -55,7 +54,7 @@ public class TribeShieldLoadedTests extends ESTestCase {
|
|||
Settings.Builder builder = addTribeSettings(defaultSettings(), "t2");
|
||||
|
||||
try {
|
||||
NodeBuilder.nodeBuilder().settings(builder.build()).build();
|
||||
new Node(builder.build());
|
||||
fail("node initialization should have failed due to missing shield plugin");
|
||||
} catch(Throwable t) {
|
||||
assertThat(t.getMessage(), containsString("Missing mandatory plugins [shield]"));
|
||||
|
|
|
@ -5,9 +5,9 @@
|
|||
*/
|
||||
package org.elasticsearch.watcher.test.bench;
|
||||
|
||||
import org.elasticsearch.common.Randomness;
|
||||
import org.elasticsearch.common.metrics.MeanMetric;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.watcher.support.clock.SystemClock;
|
||||
import org.elasticsearch.watcher.trigger.Trigger;
|
||||
import org.elasticsearch.watcher.trigger.TriggerEngine;
|
||||
|
@ -22,7 +22,6 @@ import org.elasticsearch.watcher.trigger.schedule.engine.TickerScheduleTriggerEn
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
@ -65,7 +64,7 @@ public class ScheduleEngineTriggerBenchmark {
|
|||
}
|
||||
ScheduleRegistry scheduleRegistry = new ScheduleRegistry(emptyMap());
|
||||
List<String> impls = new ArrayList<>(Arrays.asList(new String[]{"schedule", "ticker"}));
|
||||
Collections.shuffle(impls);
|
||||
Randomness.shuffle(impls);
|
||||
|
||||
List<Stats> results = new ArrayList<>();
|
||||
for (String impl : impls) {
|
||||
|
|
|
@ -11,21 +11,22 @@ import org.elasticsearch.client.Client;
|
|||
import org.elasticsearch.common.inject.Module;
|
||||
import org.elasticsearch.common.logging.Loggers;
|
||||
import org.elasticsearch.common.settings.Settings;
|
||||
import org.elasticsearch.watcher.WatcherPlugin;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
import org.elasticsearch.node.MockNode;
|
||||
import org.elasticsearch.node.Node;
|
||||
import org.elasticsearch.node.NodeBuilder;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
import org.elasticsearch.watcher.WatcherPlugin;
|
||||
import org.elasticsearch.watcher.client.WatchSourceBuilder;
|
||||
import org.elasticsearch.watcher.client.WatcherClient;
|
||||
import org.elasticsearch.watcher.support.http.HttpRequestTemplate;
|
||||
import org.elasticsearch.watcher.transport.actions.put.PutWatchRequest;
|
||||
import org.elasticsearch.watcher.trigger.ScheduleTriggerEngineMock;
|
||||
import org.elasticsearch.watcher.trigger.TriggerModule;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import static org.elasticsearch.watcher.actions.ActionBuilders.indexAction;
|
||||
import static org.elasticsearch.watcher.condition.ConditionBuilders.scriptCondition;
|
||||
|
|
|
@ -19,18 +19,15 @@ import org.elasticsearch.common.settings.Settings;
|
|||
import org.elasticsearch.common.unit.ByteSizeValue;
|
||||
import org.elasticsearch.common.xcontent.XContentType;
|
||||
import org.elasticsearch.index.query.QueryBuilders;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
import org.elasticsearch.monitor.jvm.JvmInfo;
|
||||
import org.elasticsearch.node.MockNode;
|
||||
import org.elasticsearch.node.Node;
|
||||
import org.elasticsearch.node.NodeBuilder;
|
||||
import org.elasticsearch.script.Script;
|
||||
import org.elasticsearch.search.aggregations.bucket.histogram.Histogram;
|
||||
import org.elasticsearch.search.aggregations.bucket.terms.Terms;
|
||||
import org.elasticsearch.search.aggregations.metrics.percentiles.Percentiles;
|
||||
import org.elasticsearch.search.builder.SearchSourceBuilder;
|
||||
import org.elasticsearch.threadpool.ThreadPoolStats;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
import org.elasticsearch.watcher.WatcherState;
|
||||
import org.elasticsearch.watcher.actions.ActionBuilders;
|
||||
import org.elasticsearch.watcher.actions.logging.LoggingLevel;
|
||||
|
@ -39,6 +36,7 @@ import org.elasticsearch.watcher.client.WatcherClient;
|
|||
import org.elasticsearch.watcher.history.HistoryStore;
|
||||
import org.elasticsearch.watcher.support.clock.Clock;
|
||||
import org.elasticsearch.watcher.watch.WatchStore;
|
||||
import org.elasticsearch.xpack.XPackPlugin;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
@ -47,7 +45,9 @@ import java.util.Locale;
|
|||
import java.util.Map;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
|
||||
import static org.elasticsearch.search.aggregations.AggregationBuilders.*;
|
||||
import static org.elasticsearch.search.aggregations.AggregationBuilders.histogram;
|
||||
import static org.elasticsearch.search.aggregations.AggregationBuilders.percentiles;
|
||||
import static org.elasticsearch.search.aggregations.AggregationBuilders.terms;
|
||||
import static org.elasticsearch.watcher.condition.ConditionBuilders.scriptCondition;
|
||||
import static org.elasticsearch.watcher.input.InputBuilders.searchInput;
|
||||
import static org.elasticsearch.watcher.trigger.TriggerBuilders.schedule;
|
||||
|
@ -94,7 +94,7 @@ public class WatcherScheduleEngineBenchmark {
|
|||
|
||||
|
||||
// First clean everything and index the watcher (but not via put alert api!)
|
||||
try (Node node = NodeBuilder.nodeBuilder().settings(SETTINGS).data(false).node()) {
|
||||
try (Node node = new Node(Settings.builder().put(SETTINGS).put("node.data", false).build()).start()) {
|
||||
try (Client client = node.client()) {
|
||||
ClusterHealthResponse response = client.admin().cluster().prepareHealth().setWaitForNodes("2").get();
|
||||
if (response.getNumberOfNodes() != 2 && response.getNumberOfDataNodes() != 1) {
|
||||
|
|
Loading…
Reference in New Issue