@@ -522,28 +522,30 @@ public void testSymlinkUpdateTriggerReload() throws Exception {
522522 assertBusy (() -> assertTrue (masterFileSettingsService .watching ()));
523523 assertFalse (dataFileSettingsService .watching ());
524524
525- createK8sLikeMount (masterNode );
525+ // Create the settings.json as a symlink to simulate k8 setup
526+ // settings.json -> ..data/settings.json
527+ // ..data -> ..TIMESTAMP_TEMP_FOLDER_1
528+ createK8sLikeSymlinks (masterNode );
526529 assertClusterStateSaveOK (savedClusterState .v1 (), savedClusterState .v2 (), "50mb" );
527530 }
528531 {
529532 var savedClusterState = setupClusterStateListener (masterNode );
530- updateSymbolicLink (masterNode , testJSON43mb );
533+ // Update ..data symlink to ..data -> ..TIMESTAMP_TEMP_FOLDER_2 to simulate kubernetes secret update
534+ updateSymlinks (masterNode , testJSON43mb );
531535 assertClusterStateSaveOK (savedClusterState .v1 (), savedClusterState .v2 (), "43mb" );
532536 }
533537 }
534538
535- public Path createK8sLikeMount (String node ) throws Exception {
539+ public Path createK8sLikeSymlinks (String node ) throws Exception {
536540 FileSettingsService fileSettingsService = internalCluster ().getInstance (FileSettingsService .class , node );
537541 Path baseDir = fileSettingsService .watchedFileDir ();
538542 var fileDir = Files .createDirectories (baseDir .resolve ("..TIMESTAMP_TEMP_FOLDER_1" ));
539543 writeJSONFile (node , testJSON , logger , versionCounter .incrementAndGet (), fileDir .resolve ("settings.json" ));
540-
541544 var dataDir = Files .createSymbolicLink (baseDir .resolve ("..data" ), fileDir .getFileName ());
542-
543545 return Files .createSymbolicLink (baseDir .resolve ("settings.json" ), dataDir .getFileName ().resolve ("settings.json" ));
544546 }
545547
546- public void updateSymbolicLink (String node , String json ) throws Exception {
548+ public void updateSymlinks (String node , String json ) throws Exception {
547549 FileSettingsService fileSettingsService = internalCluster ().getInstance (FileSettingsService .class , node );
548550 Path baseDir = fileSettingsService .watchedFileDir ();
549551 var fileDir = Files .createDirectories (baseDir .resolve ("..TIMESTAMP_TEMP_FOLDER_2" ));
0 commit comments