Skip to content

Commit

Permalink
Fix is_active() call to check_cluster_status() (#138)
Browse files Browse the repository at this point in the history
Orchestrator method is_active() had the incorrect set 
of parameters for check_cluster_status() call. 
The parameters have been fixed and checks added to WLM 
tests to check that get_address() (which calls this method) 
returns correctly sized result.

[ committed by @mellis13 ]
[ reviewed by @al-rigazzi  ]
  • Loading branch information
mellis13 authored Feb 4, 2022
1 parent e9210d4 commit 1f1a3cb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 1 deletion.
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

0 comments on commit 1f1a3cb

Please sign in to comment.