@@ -524,16 +524,16 @@ public void testParsingOriginationDateBeforeIndexCreation() {
524524 }
525525 }
526526
527- public void testIndicesOnShuttingDownNodesInDangerousStep () {
527+ public void testHasIndicesInDangerousStepForNodeShutdown () {
528528 for (SingleNodeShutdownMetadata .Type type : List .of (
529529 SingleNodeShutdownMetadata .Type .REMOVE ,
530530 SingleNodeShutdownMetadata .Type .SIGTERM ,
531531 SingleNodeShutdownMetadata .Type .REPLACE
532532 )) {
533533 final var project = ProjectMetadata .builder (randomProjectIdOrDefault ()).build ();
534534 ClusterState state = ClusterState .builder (ClusterName .DEFAULT ).putProjectMetadata (project ).build ();
535- assertThat (IndexLifecycleService .indicesOnShuttingDownNodesInDangerousStep (state , "regular_node" ), equalTo (true ));
536- assertThat (IndexLifecycleService .indicesOnShuttingDownNodesInDangerousStep (state , "shutdown_node" ), equalTo (true ));
535+ assertThat (IndexLifecycleService .hasIndicesInDangerousStepForNodeShutdown (state , "regular_node" ), equalTo (true ));
536+ assertThat (IndexLifecycleService .hasIndicesInDangerousStepForNodeShutdown (state , "shutdown_node" ), equalTo (true ));
537537
538538 IndexMetadata nonDangerousIndex = IndexMetadata .builder ("no_danger" )
539539 .settings (settings (IndexVersion .current ()).put (LifecycleSettings .LIFECYCLE_NAME , "mypolicy" ))
@@ -603,8 +603,8 @@ public void testIndicesOnShuttingDownNodesInDangerousStep() {
603603 .build ();
604604
605605 // No danger yet, because no node is shutting down
606- assertThat (IndexLifecycleService .indicesOnShuttingDownNodesInDangerousStep (state , "regular_node" ), equalTo (true ));
607- assertThat (IndexLifecycleService .indicesOnShuttingDownNodesInDangerousStep (state , "shutdown_node" ), equalTo (true ));
606+ assertThat (IndexLifecycleService .hasIndicesInDangerousStepForNodeShutdown (state , "regular_node" ), equalTo (true ));
607+ assertThat (IndexLifecycleService .hasIndicesInDangerousStepForNodeShutdown (state , "shutdown_node" ), equalTo (true ));
608608
609609 state = ClusterState .builder (state )
610610 .metadata (
@@ -628,11 +628,11 @@ public void testIndicesOnShuttingDownNodesInDangerousStep() {
628628 )
629629 .build ();
630630
631- assertThat (IndexLifecycleService .indicesOnShuttingDownNodesInDangerousStep (state , "regular_node" ), equalTo (true ));
631+ assertThat (IndexLifecycleService .hasIndicesInDangerousStepForNodeShutdown (state , "regular_node" ), equalTo (true ));
632632 // No danger, because this is a "RESTART" type shutdown
633633 assertThat (
634634 "restart type shutdowns are not considered dangerous" ,
635- IndexLifecycleService .indicesOnShuttingDownNodesInDangerousStep (state , "shutdown_node" ),
635+ IndexLifecycleService .hasIndicesInDangerousStepForNodeShutdown (state , "shutdown_node" ),
636636 equalTo (true )
637637 );
638638
@@ -663,7 +663,7 @@ public void testIndicesOnShuttingDownNodesInDangerousStep() {
663663 .build ();
664664
665665 // The dangerous index should be calculated as being in danger now
666- assertThat (IndexLifecycleService .indicesOnShuttingDownNodesInDangerousStep (state , "shutdown_node" ), equalTo (false ));
666+ assertThat (IndexLifecycleService .hasIndicesInDangerousStepForNodeShutdown (state , "shutdown_node" ), equalTo (false ));
667667 }
668668 }
669669}
0 commit comments