Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add extended timeout to all polling loop calls #1155

Merged
merged 1 commit into from
Nov 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions libensemble/tests/unit_tests/test_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ def test_procs_and_machinefile_logic():
)
else:
task = exctr.submit(calc_type="sim", num_procs=6, num_nodes=2, procs_per_node=3, app_args=args_for_sim)
task = polling_loop(exctr, task, delay=0.05)
task = polling_loop(exctr, task, timeout_sec=4, delay=0.05)
time.sleep(0.25)
assert task.finished, "task.finished should be True. Returned " + str(task.finished)
assert task.state == "FINISHED", "task.state should be FINISHED. Returned " + str(task.state)
Expand All @@ -434,7 +434,7 @@ def test_procs_and_machinefile_logic():
else:
task = exctr.submit(calc_type="sim", num_nodes=2, procs_per_node=3, app_args=args_for_sim)
assert 1
task = polling_loop(exctr, task, delay=0.05)
task = polling_loop(exctr, task, timeout_sec=4, delay=0.05)
time.sleep(0.25)
assert task.finished, "task.finished should be True. Returned " + str(task.finished)
assert task.state == "FINISHED", "task.state should be FINISHED. Returned " + str(task.state)
Expand All @@ -450,14 +450,14 @@ def test_procs_and_machinefile_logic():
# Testing no num_nodes (should not fail).
task = exctr.submit(calc_type="sim", num_procs=2, procs_per_node=2, app_args=args_for_sim)
assert 1
task = polling_loop(exctr, task, delay=0.05)
task = polling_loop(exctr, task, timeout_sec=4, delay=0.05)
assert task.finished, "task.finished should be True. Returned " + str(task.finished)
assert task.state == "FINISHED", "task.state should be FINISHED. Returned " + str(task.state)

# Testing no procs_per_node (shouldn't fail)
task = exctr.submit(calc_type="sim", num_nodes=1, num_procs=2, app_args=args_for_sim)
assert 1
task = polling_loop(exctr, task, delay=0.05)
task = polling_loop(exctr, task, timeout_sec=4, delay=0.05)
assert task.finished, "task.finished should be True. Returned " + str(task.finished)
assert task.state == "FINISHED", "task.state should be FINISHED. Returned " + str(task.state)

Expand Down
Loading