diff --git a/server/src/test/java/org/opensearch/cluster/coordination/NoMasterBlockServiceRenamedSettingTests.java b/server/src/test/java/org/opensearch/cluster/coordination/NoMasterBlockServiceRenamedSettingTests.java index 4c735fbdb55c2..2c988cad5f79c 100644 --- a/server/src/test/java/org/opensearch/cluster/coordination/NoMasterBlockServiceRenamedSettingTests.java +++ b/server/src/test/java/org/opensearch/cluster/coordination/NoMasterBlockServiceRenamedSettingTests.java @@ -41,8 +41,9 @@ public void testReindexSettingsExist() { */ public void testSettingFallback() { assertEquals( - NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(Settings.EMPTY), - NoMasterBlockService.NO_MASTER_BLOCK_SETTING.get(Settings.EMPTY) + NoMasterBlockService.NO_MASTER_BLOCK_SETTING.get(Settings.EMPTY), + NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(Settings.EMPTY) + ); } @@ -51,10 +52,10 @@ public void testSettingFallback() { */ public void testSettingGetValue() { Settings settings = Settings.builder().put("cluster.no_cluster_manager_block", "all").build(); - assertEquals(NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(settings), NoMasterBlockService.NO_MASTER_BLOCK_ALL); + assertEquals(NoMasterBlockService.NO_MASTER_BLOCK_ALL, NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(settings)); assertEquals( - NoMasterBlockService.NO_MASTER_BLOCK_SETTING.get(settings), - NoMasterBlockService.NO_MASTER_BLOCK_SETTING.getDefault(Settings.EMPTY) + NoMasterBlockService.NO_MASTER_BLOCK_SETTING.getDefault(Settings.EMPTY), + NoMasterBlockService.NO_MASTER_BLOCK_SETTING.get(settings) ); } @@ -64,8 +65,8 @@ public void testSettingGetValue() { public void testSettingGetValueWithFallback() { Settings settings = Settings.builder().put("cluster.no_master_block", "metadata_write").build(); assertEquals( - NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(settings), - NoMasterBlockService.NO_MASTER_BLOCK_METADATA_WRITES + NoMasterBlockService.NO_MASTER_BLOCK_METADATA_WRITES, + NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(settings) ); assertSettingDeprecationsAndWarnings(new Setting[] { NoMasterBlockService.NO_MASTER_BLOCK_SETTING }); } @@ -78,8 +79,8 @@ public void testSettingGetValueWhenBothAreConfigured() { .put("cluster.no_cluster_manager_block", "all") .put("cluster.no_master_block", "metadata_write") .build(); - assertEquals(NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(settings), NoMasterBlockService.NO_MASTER_BLOCK_ALL); - assertEquals(NoMasterBlockService.NO_MASTER_BLOCK_SETTING.get(settings), NoMasterBlockService.NO_MASTER_BLOCK_METADATA_WRITES); + assertEquals(NoMasterBlockService.NO_MASTER_BLOCK_ALL, NoMasterBlockService.NO_CLUSTER_MANAGER_BLOCK_SETTING.get(settings)); + assertEquals(NoMasterBlockService.NO_MASTER_BLOCK_METADATA_WRITES, NoMasterBlockService.NO_MASTER_BLOCK_SETTING.get(settings)); assertSettingDeprecationsAndWarnings(new Setting[] { NoMasterBlockService.NO_MASTER_BLOCK_SETTING }); }