adapt ZenDiscoveryUnitTests to removal of INGEST_ATTR, MASTER_ATTR and DATA_ATTR
This commit is contained in:
parent
dd32bcea7a
commit
7bc4a35f9a
|
@ -105,9 +105,8 @@ public class ZenDiscoveryUnitTests extends ESTestCase {
|
||||||
ArrayList<DiscoveryNode> allNodes = new ArrayList<>();
|
ArrayList<DiscoveryNode> allNodes = new ArrayList<>();
|
||||||
for (int i = randomIntBetween(10, 20); i >= 0; i--) {
|
for (int i = randomIntBetween(10, 20); i >= 0; i--) {
|
||||||
Map<String, String> attrs = new HashMap<>();
|
Map<String, String> attrs = new HashMap<>();
|
||||||
for (String attr : randomSubsetOf(
|
for (DiscoveryNode.Role role : randomSubsetOf(Arrays.asList(DiscoveryNode.Role.values()))) {
|
||||||
Arrays.asList(DiscoveryNode.INGEST_ATTR, DiscoveryNode.DATA_ATTR, DiscoveryNode.MASTER_ATTR))) {
|
attrs.put(role.getRoleName(), Boolean.toString(randomBoolean()));
|
||||||
attrs.put(attr, randomBoolean() + "");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DiscoveryNode node = new DiscoveryNode("node_" + i, "id_" + i, DummyTransportAddress.INSTANCE, attrs, Version.CURRENT);
|
DiscoveryNode node = new DiscoveryNode("node_" + i, "id_" + i, DummyTransportAddress.INSTANCE, attrs, Version.CURRENT);
|
||||||
|
|
Loading…
Reference in New Issue