Fix testSetAdditionalRolesCanAddDeprecatedMasterRole() by removing the initial assertion (#3441)

Signed-off-by: Tianli Feng <ftianli@amazon.com>
This commit is contained in:
Tianli Feng 2022-05-25 16:27:17 -07:00 committed by GitHub
parent 5320b680e7
commit 509978012b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 3 deletions

View File

@ -179,9 +179,6 @@ public class DiscoveryNodeTests extends OpenSearchTestCase {
// as a workaround for making the new CLUSTER_MANAGER_ROLE has got the same abbreviation 'm'.
// The test validate this behavior.
public void testSetAdditionalRolesCanAddDeprecatedMasterRole() {
// Validate MASTER_ROLE is not in DiscoveryNodeRole.BUILT_IN_ROLES
assertFalse(DiscoveryNode.getPossibleRoleNames().contains(DiscoveryNodeRole.MASTER_ROLE.roleName()));
DiscoveryNode.setAdditionalRoles(Collections.emptySet());
assertTrue(DiscoveryNode.getPossibleRoleNames().contains(DiscoveryNodeRole.MASTER_ROLE.roleName()));
}