Skip to content

Commit

Permalink
Fix flacky node is online subtest
Browse files Browse the repository at this point in the history
Signed-off-by: Michael Engel <[email protected]>
  • Loading branch information
engelmi committed Dec 14, 2024
1 parent 418604b commit de238cc
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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__":
Expand Down

0 comments on commit de238cc

Please sign in to comment.