From 16c39f355388ca114b3f258bc85f96fdbcbc5541 Mon Sep 17 00:00:00 2001 From: Aman Agrawal <84079241+am-agrawa@users.noreply.github.com> Date: Mon, 23 Oct 2023 12:29:41 +0530 Subject: [PATCH] Wait for node deletion and verify original node count during teardown of test_automated_recovery_from_stopped_node_and_start[True] (#8711) Signed-off-by: am-agrawa --- ...omated_recovery_from_failed_nodes_reactive_IPI.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/manage/z_cluster/nodes/test_automated_recovery_from_failed_nodes_reactive_IPI.py b/tests/manage/z_cluster/nodes/test_automated_recovery_from_failed_nodes_reactive_IPI.py index 381c6f1a6c3..e1f515be8f0 100644 --- a/tests/manage/z_cluster/nodes/test_automated_recovery_from_failed_nodes_reactive_IPI.py +++ b/tests/manage/z_cluster/nodes/test_automated_recovery_from_failed_nodes_reactive_IPI.py @@ -35,6 +35,7 @@ get_node_pods, wait_for_nodes_racks_or_zones, wait_for_nodes_status, + wait_for_node_count_to_reach_status, ) from ocs_ci.ocs.exceptions import ResourceWrongStatusException @@ -245,10 +246,15 @@ def finalizer(): ) add_new_nodes_and_label_after_node_failure_ipi(self.machineset_name) + log.info("Wait for node count to be equal to original count") + wait_for_node_count_to_reach_status(node_count=initial_node_count) + log.info("Node count matched") ceph_health_check() machine.wait_for_ready_replica_count_to_reach_expected_value( - self.machineset_name, expected_value=self.start_ready_replica_count + self.machineset_name, + expected_value=self.start_ready_replica_count, + timeout=420, ) log.info( "Verify that the current replica count is equal to the ready replica count" @@ -302,6 +308,10 @@ def test_automated_recovery_from_stopped_node_and_start( self.machineset_name ) + global initial_node_count + initial_node_count = len(get_worker_nodes()) + log.info(f"Initial node count is {initial_node_count}") + if additional_node: new_ocs_node_names = add_new_node_and_label_it(self.machineset_name) failure_domain = get_failure_domain()