Skip to content

Commit

Permalink
Merge branch 'master' into rjmello-kube-pod-names
Browse files Browse the repository at this point in the history
  • Loading branch information
benclifford authored Oct 19, 2024
2 parents 4d099d6 + 973ee48 commit 4eba07a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions parsl/tests/test_htex/test_drain.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# last twice that many number of seconds.
TIME_CONST = 1

CONNECTED_MANAGERS_POLL_MS = 100


def local_config():
return Config(
Expand Down Expand Up @@ -52,7 +54,7 @@ def test_drain(try_assert):

# wait till we have a block running...

try_assert(lambda: len(htex.connected_managers()) == 1)
try_assert(lambda: len(htex.connected_managers()) == 1, check_period_ms=CONNECTED_MANAGERS_POLL_MS)

managers = htex.connected_managers()
assert managers[0]['active'], "The manager should be active"
Expand All @@ -63,7 +65,7 @@ def test_drain(try_assert):
time.sleep(TIME_CONST)

# this assert should happen *very fast* after the above delay...
try_assert(lambda: htex.connected_managers()[0]['draining'], timeout_ms=500)
try_assert(lambda: htex.connected_managers()[0]['draining'], timeout_ms=500, check_period_ms=CONNECTED_MANAGERS_POLL_MS)

# and the test task should still be running...
assert not fut.done(), "The test task should still be running"
Expand All @@ -76,4 +78,4 @@ def test_drain(try_assert):
# connected managers.
# As with the above draining assert, this should happen very fast after
# the task ends.
try_assert(lambda: len(htex.connected_managers()) == 0, timeout_ms=500)
try_assert(lambda: len(htex.connected_managers()) == 0, timeout_ms=500, check_period_ms=CONNECTED_MANAGERS_POLL_MS)

0 comments on commit 4eba07a

Please sign in to comment.