Skip to content

Commit 8387ee8

Browse files
committed
check in robustify test
Signed-off-by: Jack Luar <[email protected]>
1 parent 803829e commit 8387ee8

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tools/AutoTuner/test/resume_check.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,16 @@ def test_tune_resume(self):
6868
with managed_process(self.commands[0], shell=True) as proc:
6969
time.sleep(120)
7070

71-
# Close all ray instances
72-
subprocess.run("ray stop", shell=True)
71+
# Keep trying to stop the ray cluster until it is stopped
72+
while 1:
73+
proc = subprocess.run("ray status", shell=True)
74+
no_nodes = proc.returncode != 0
75+
proc = subprocess.run("ray stop", shell=True)
76+
successful = proc.returncode == 0
77+
78+
if no_nodes and successful:
79+
break
80+
time.sleep(10)
7381

7482
# Run the second config to completion
7583
print("Running the second config")

0 commit comments

Comments
 (0)