diff --git a/parsl/tests/test_htex/test_drain.py b/parsl/tests/test_htex/test_drain.py index da115b42f0..5f8e86e4b7 100644 --- a/parsl/tests/test_htex/test_drain.py +++ b/parsl/tests/test_htex/test_drain.py @@ -15,6 +15,8 @@ # last twice that many number of seconds. TIME_CONST = 1 +CONNECTED_MANAGERS_POLL_MS = 100 + def local_config(): return Config( @@ -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" @@ -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" @@ -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)