diff --git a/tests/tests/tier0/bluechi-controller-socket-activation/python/is_node_connected.py b/tests/tests/tier0/bluechi-controller-socket-activation/python/is_node_connected.py index b27e170b6b..0645f9f5b6 100644 --- a/tests/tests/tier0/bluechi-controller-socket-activation/python/is_node_connected.py +++ b/tests/tests/tier0/bluechi-controller-socket-activation/python/is_node_connected.py @@ -15,11 +15,15 @@ class TestNodeIsConnected(unittest.TestCase): def test_node_is_connected(self): - n = Node(NODE_NAME) with Timeout(5, f"Timeout while waiting for agent '{NODE_NAME}' to be online"): - while n.status != "online": - time.sleep(0.5) + status = "offline" + while status != "online": + try: + status = Node(NODE_NAME).status + time.sleep(0.5) + except Exception: + pass if __name__ == "__main__":