Skip to content

Commit 9478857

Browse files
committed
Fixed race condition in test.
1 parent 0faccf5 commit 9478857

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tests/user_guide/test_job_wait_active.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33

44
def test_user_guide_job_wait_active() -> None:
55
ex = JobExecutor.get_instance('local')
6-
job = Job(JobSpec(executable='/bin/date'))
6+
job = Job(JobSpec(executable='/bin/sleep', arguments=['1']))
77
ex.submit(job)
88
status = job.wait(target_states=[JobState.ACTIVE])
99
assert status is not None
1010
assert status.state == JobState.ACTIVE
11+
job.wait() # prevent logging messages from showing up after test completes

0 commit comments

Comments
 (0)