From e44262fb582a01957bbf98a1ef710b99d89d28df Mon Sep 17 00:00:00 2001 From: matthewc2003 Date: Sat, 12 Oct 2024 20:14:26 +0000 Subject: [PATCH] fix e2e test --- parsl/tests/test_htex/test_manager_selector_by_block.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/parsl/tests/test_htex/test_manager_selector_by_block.py b/parsl/tests/test_htex/test_manager_selector_by_block.py index 76154a7a71..f752a0b6b8 100644 --- a/parsl/tests/test_htex/test_manager_selector_by_block.py +++ b/parsl/tests/test_htex/test_manager_selector_by_block.py @@ -41,14 +41,13 @@ def get_worker_pid(): import os return os.environ.get('PARSL_WORKER_BLOCK_ID') - @pytest.mark.local -def test_block_id_selection(): +def test_block_id_selection(try_assert): blockids = [] + try_assert(lambda: (time.sleep(1) or get_worker_pid().result() == "1"), timeout_ms=20000) for i in range(10): future = get_worker_pid() blockids.append(future.result()) print(future.result()) - time.sleep(1) assert all(blockid == "1" for blockid in blockids)