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

Fix is_active() call to check_cluster_status() #138

Merged
merged 1 commit into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion smartsim/database/orchestrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def is_active(self):
# if a cluster
else:
try:
check_cluster_status(trials=1)
check_cluster_status(self._hosts, self.ports, trials=1)
return True
# we expect this to fail if the cluster is not active
except SSInternalError:
Expand Down
4 changes: 4 additions & 0 deletions tests/on_wlm/test_launch_orc_cobalt.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ def test_launch_cobalt_cluster_orc(fileutils, wlmutils):
exp.stop(orc)
assert False

if len(orc.get_address()) < 3:
exp.stop(orc)
assert False

exp.stop(orc)
status = exp.get_status(orc)
assert all([stat == status.STATUS_CANCELLED for stat in status])
4 changes: 4 additions & 0 deletions tests/on_wlm/test_launch_orc_pbs.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def test_launch_pbs_cluster_orc(fileutils, wlmutils):
exp.stop(orc)
assert False

if len(orc.get_address()) < 3:
exp.stop(orc)
assert False

exp.stop(orc)
status = exp.get_status(orc)
assert all([stat == status.STATUS_CANCELLED for stat in status])
4 changes: 4 additions & 0 deletions tests/on_wlm/test_launch_orc_slurm.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ def test_launch_slurm_cluster_orc(fileutils, wlmutils):
exp.stop(orc)
assert False

if len(orc.get_address()) < 3:
exp.stop(orc)
assert False

exp.stop(orc)
statuses = exp.get_status(orc)
assert all([stat == status.STATUS_CANCELLED for stat in statuses])
Expand Down