@Test public void testPreTerminationRecipes() throws CloudbreakException, CloudbreakOrchestratorFailedException, CloudbreakOrchestratorTimeoutException { Cluster cluster = new Cluster(); cluster.setId(2L); when(stack.getCluster()).thenReturn(cluster); when(gatewayConfigService.getPrimaryGatewayConfig(any())).thenReturn(gatewayConfig); Set<Node> nodes = Set.of(node); when(stackUtil.collectReachableNodes(any())).thenReturn(nodes); underTest.preTerminationRecipes(stack, false); verify(hostOrchestrator).preTerminationRecipes(eq(gatewayConfig), eq(Set.of(node)), exitCriteriaModelCaptor.capture(), eq(false)); ExitCriteriaModel exitCriteriaModel = exitCriteriaModelCaptor.getValue(); assertThat(exitCriteriaModel).isOfAnyClassIn(ClusterDeletionBasedExitCriteriaModel.class); }
public void preTerminationRecipes(Stack stack, boolean forced) throws CloudbreakException { preTerminationRecipesOnNodes(stack, stackUtil.collectReachableNodes(stack), forced); }
OrchestratorRecipeExecutor { public void preTerminationRecipes(Stack stack, boolean forced) throws CloudbreakException { preTerminationRecipesOnNodes(stack, stackUtil.collectReachableNodes(stack), forced); } }
OrchestratorRecipeExecutor { public void preTerminationRecipes(Stack stack, boolean forced) throws CloudbreakException { preTerminationRecipesOnNodes(stack, stackUtil.collectReachableNodes(stack), forced); }  }
OrchestratorRecipeExecutor { public void preTerminationRecipes(Stack stack, boolean forced) throws CloudbreakException { preTerminationRecipesOnNodes(stack, stackUtil.collectReachableNodes(stack), forced); }  void uploadRecipes(Stack stack, Set<HostGroup> hostGroups); void preClusterManagerStartRecipes(Stack stack); void postClusterManagerStartRecipes(Stack stack); void postClusterInstall(Stack stack); void preTerminationRecipes(Stack stack, boolean forced); void preTerminationRecipes(Stack stack, Set<String> hostNames); void preTerminationRecipesOnNodes(Stack stack, Set<Node> nodes, boolean forced); }
OrchestratorRecipeExecutor { public void preTerminationRecipes(Stack stack, boolean forced) throws CloudbreakException { preTerminationRecipesOnNodes(stack, stackUtil.collectReachableNodes(stack), forced); }  void uploadRecipes(Stack stack, Set<HostGroup> hostGroups); void preClusterManagerStartRecipes(Stack stack); void postClusterManagerStartRecipes(Stack stack); void postClusterInstall(Stack stack); void preTerminationRecipes(Stack stack, boolean forced); void preTerminationRecipes(Stack stack, Set<String> hostNames); void preTerminationRecipesOnNodes(Stack stack, Set<Node> nodes, boolean forced);  }