Skip to content

Commit

Permalink
fix tearDown and improve read alerts
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Osypenko <[email protected]>
  • Loading branch information
DanielOsypenko committed Jul 14, 2024
1 parent 495e7c2 commit edd0993
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions ocs_ci/ocs/ui/page_objects/odf_topology_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def is_alert_tab_present(self) -> bool:
return bool(self.get_elements(self.topology_loc["alerts_sidebar_tab"]))

def open_side_bar_of_entity(self, entity_name: str = None, canvas: bool = False):

"""
Opens the sidebar of an entity in the topology view.
Expand Down Expand Up @@ -111,7 +110,9 @@ def is_node_down_alert_in_alerts_ui(self, entity=None, read_canvas_alerts=False)
Returns:
bool: if the node down alert visible in Alerts tab of the Topology
"""
alerts_dict = self.read_alerts_procedure(entity, read_canvas_alerts)
alerts_dict = retry(TimeoutException, tries=3, delay=5)(
self.read_alerts_procedure
)(entity, read_canvas_alerts)
return (
"Critical" in alerts_dict
and constants.ALERT_NODEDOWN in alerts_dict["Critical"]
Expand Down
2 changes: 1 addition & 1 deletion tests/cross_functional/ui/test_odf_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ def finalizer_wait_cluster_healthy():
"""
ceph_health_check(tries=60, delay=30)

request.addfinalizer(finalizer_restart_nodes_by_stop_and_start_teardown)
request.addfinalizer(finalizer_wait_cluster_healthy)
request.addfinalizer(finalizer_restart_nodes_by_stop_and_start_teardown)


@pytest.fixture()
Expand Down

0 comments on commit edd0993

Please sign in to comment.