Fix compilation in DataTierTests.java
This commit fixes a compilation issue in DataTierTests.java that was introduced due to language-level differences between 7.10/7.x and master.
This commit is contained in:
parent
0d0c42c746
commit
b46b6d5977
|
@ -86,7 +86,9 @@ public class DataTierTests extends ESTestCase {
|
|||
|
||||
public void testDefaultRolesImpliesTieredDataRoles() {
|
||||
DiscoveryNode.setAdditionalRoles(
|
||||
Set.of(DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE)
|
||||
org.elasticsearch.common.collect.Set.of(
|
||||
DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE
|
||||
)
|
||||
);
|
||||
final DiscoveryNode node = DiscoveryNode.createLocal(Settings.EMPTY, buildNewFakeTransportAddress(), randomAlphaOfLength(8));
|
||||
assertThat(node.getRoles(), hasItem(DataTier.DATA_CONTENT_NODE_ROLE));
|
||||
|
@ -97,7 +99,9 @@ public class DataTierTests extends ESTestCase {
|
|||
|
||||
public void testDataRoleDoesNotImplyTieredDataRoles() {
|
||||
DiscoveryNode.setAdditionalRoles(
|
||||
Set.of(DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE)
|
||||
org.elasticsearch.common.collect.Set.of(
|
||||
DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE
|
||||
)
|
||||
);
|
||||
final Settings settings = Settings.builder().put(NodeRoleSettings.NODE_ROLES_SETTING.getKey(), "data").build();
|
||||
final DiscoveryNode node = DiscoveryNode.createLocal(settings, buildNewFakeTransportAddress(), randomAlphaOfLength(8));
|
||||
|
@ -109,7 +113,9 @@ public class DataTierTests extends ESTestCase {
|
|||
|
||||
public void testLegacyDataRoleImpliesTieredDataRoles() {
|
||||
DiscoveryNode.setAdditionalRoles(
|
||||
Set.of(DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE)
|
||||
org.elasticsearch.common.collect.Set.of(
|
||||
DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE
|
||||
)
|
||||
);
|
||||
final Settings settings = Settings.builder().put(DiscoveryNodeRole.DATA_ROLE.legacySetting().getKey(), true).build();
|
||||
final DiscoveryNode node = DiscoveryNode.createLocal(settings, buildNewFakeTransportAddress(), randomAlphaOfLength(8));
|
||||
|
@ -122,7 +128,9 @@ public class DataTierTests extends ESTestCase {
|
|||
|
||||
public void testDisablingLegacyDataRoleDisablesTieredDataRoles() {
|
||||
DiscoveryNode.setAdditionalRoles(
|
||||
Set.of(DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE)
|
||||
org.elasticsearch.common.collect.Set.of(
|
||||
DataTier.DATA_CONTENT_NODE_ROLE, DataTier.DATA_HOT_NODE_ROLE, DataTier.DATA_WARM_NODE_ROLE, DataTier.DATA_COLD_NODE_ROLE
|
||||
)
|
||||
);
|
||||
final Settings settings = Settings.builder().put(DiscoveryNodeRole.DATA_ROLE.legacySetting().getKey(), false).build();
|
||||
final DiscoveryNode node = DiscoveryNode.createLocal(settings, buildNewFakeTransportAddress(), randomAlphaOfLength(8));
|
||||
|
|
Loading…
Reference in New Issue