@@ -253,7 +253,7 @@ public void testSettingsApplied() throws Exception {
253
253
254
254
FileSettingsService masterFileSettingsService = internalCluster ().getInstance (FileSettingsService .class , masterNode );
255
255
256
- assertTrue (masterFileSettingsService .watching ());
256
+ assertBusy (() -> assertTrue (masterFileSettingsService .watching () ));
257
257
assertFalse (dataFileSettingsService .watching ());
258
258
259
259
writeJSONFile (masterNode , testJSON , logger , versionCounter .incrementAndGet ());
@@ -279,7 +279,7 @@ public void testSettingsAppliedOnStart() throws Exception {
279
279
280
280
FileSettingsService masterFileSettingsService = internalCluster ().getInstance (FileSettingsService .class , masterNode );
281
281
282
- assertTrue (masterFileSettingsService .watching ());
282
+ assertBusy (() -> assertTrue (masterFileSettingsService .watching () ));
283
283
assertFalse (dataFileSettingsService .watching ());
284
284
285
285
assertClusterStateSaveOK (savedClusterState .v1 (), savedClusterState .v2 (), "50mb" );
@@ -374,7 +374,7 @@ public void testErrorSaved() throws Exception {
374
374
375
375
FileSettingsService masterFileSettingsService = internalCluster ().getInstance (FileSettingsService .class , masterNode );
376
376
377
- assertTrue (masterFileSettingsService .watching ());
377
+ assertBusy (() -> assertTrue (masterFileSettingsService .watching () ));
378
378
assertFalse (dataFileSettingsService .watching ());
379
379
380
380
writeJSONFile (masterNode , testErrorJSON , logger , versionCounter .incrementAndGet ());
@@ -470,7 +470,7 @@ public void testSettingsAppliedOnMasterReElection() throws Exception {
470
470
var savedClusterState = setupClusterStateListener (masterNode );
471
471
FileSettingsService masterFileSettingsService = internalCluster ().getInstance (FileSettingsService .class , masterNode );
472
472
473
- assertTrue (masterFileSettingsService .watching ());
473
+ assertBusy (() -> assertTrue (masterFileSettingsService .watching () ));
474
474
475
475
writeJSONFile (masterNode , testJSON , logger , versionCounter .incrementAndGet ());
476
476
assertClusterStateSaveOK (savedClusterState .v1 (), savedClusterState .v2 (), "50mb" );
0 commit comments