diff --git a/server/src/test/java/org/opensearch/cluster/service/MasterServiceRenamedSettingTests.java b/server/src/test/java/org/opensearch/cluster/service/MasterServiceRenamedSettingTests.java index 5ff7fee05fa99..acf089dc43b56 100644 --- a/server/src/test/java/org/opensearch/cluster/service/MasterServiceRenamedSettingTests.java +++ b/server/src/test/java/org/opensearch/cluster/service/MasterServiceRenamedSettingTests.java @@ -56,12 +56,13 @@ public void testSettingFallback() { public void testSettingGetValue() { Settings settings = Settings.builder().put("cluster.service.slow_cluster_manager_task_logging_threshold", "9s").build(); assertEquals( - MasterService.CLUSTER_MANAGER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings), - TimeValue.timeValueSeconds(9) + TimeValue.timeValueSeconds(9), + MasterService.CLUSTER_MANAGER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings) ); assertEquals( - MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings), - MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.getDefault(Settings.EMPTY) + MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.getDefault(Settings.EMPTY), + MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings) + ); } @@ -71,8 +72,9 @@ public void testSettingGetValue() { public void testSettingGetValueWithFallback() { Settings settings = Settings.builder().put("cluster.service.slow_master_task_logging_threshold", "8s").build(); assertEquals( - MasterService.CLUSTER_MANAGER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings), - TimeValue.timeValueSeconds(8) + TimeValue.timeValueSeconds(8), + MasterService.CLUSTER_MANAGER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings) + ); assertSettingDeprecationsAndWarnings(new Setting[] { MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING }); } @@ -86,10 +88,11 @@ public void testSettingGetValueWhenBothAreConfigured() { .put("cluster.service.slow_master_task_logging_threshold", "8s") .build(); assertEquals( - MasterService.CLUSTER_MANAGER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings), - TimeValue.timeValueSeconds(9) + TimeValue.timeValueSeconds(9), + MasterService.CLUSTER_MANAGER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings) + ); - assertEquals(MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings), TimeValue.timeValueSeconds(8)); + assertEquals(TimeValue.timeValueSeconds(8), MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING.get(settings)); assertSettingDeprecationsAndWarnings(new Setting[] { MasterService.MASTER_SERVICE_SLOW_TASK_LOGGING_THRESHOLD_SETTING }); }