mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-27 15:39:49 +00:00
Node clients in tests use now the same naming convention as ordinary nodes (node#)
This commit is contained in:
parent
d5323231fe
commit
74b00b63ea
@ -167,7 +167,7 @@ public class TestCluster {
|
||||
|
||||
public Node buildNode(Settings settings) {
|
||||
ensureOpen();
|
||||
String name = "node_" + nextNodeId.getAndIncrement();
|
||||
String name = buildNodeName();
|
||||
String settingsSource = getClass().getName().replace('.', '/') + ".yml";
|
||||
Settings finalSettings = settingsBuilder()
|
||||
.loadFromClasspath(settingsSource)
|
||||
@ -180,6 +180,10 @@ public class TestCluster {
|
||||
return node;
|
||||
}
|
||||
|
||||
private String buildNodeName() {
|
||||
return "node_" + nextNodeId.getAndIncrement();
|
||||
}
|
||||
|
||||
public void setClientFactory(ClientFactory factory) {
|
||||
this.clientFactory = factory;
|
||||
}
|
||||
@ -374,7 +378,7 @@ public class TestCluster {
|
||||
public Client nodeClient() {
|
||||
ensureOpen();
|
||||
if (clientNode == null) {
|
||||
String name = UUID.randomUUID().toString();
|
||||
String name = buildNodeName();
|
||||
String settingsSource = getClass().getName().replace('.', '/') + ".yml";
|
||||
Settings finalSettings = settingsBuilder().loadFromClasspath(settingsSource).put(defaultSettings).put("node.client", true).put("name", name)
|
||||
.build();
|
||||
|
Loading…
x
Reference in New Issue
Block a user