@@ -57,7 +57,7 @@ def test_load(submit_job):
5757
5858 # Load the step info, waiting one second to make sure the Step
5959 # actually exists.
60- time . sleep ( util .WAIT_SECS_SLURMCTLD )
60+ util .wait ( )
6161 step = JobStep .load (job .id , "batch" )
6262
6363 assert step .id == "batch"
@@ -101,7 +101,7 @@ def test_load(submit_job):
101101def test_collection (submit_job ):
102102 job = submit_job (script = create_job_script_multi_step ())
103103
104- time . sleep ( util .WAIT_SECS_SLURMCTLD )
104+ util .wait ( )
105105 steps = JobSteps .load (job )
106106
107107 assert steps
@@ -115,7 +115,7 @@ def test_collection(submit_job):
115115def test_cancel (submit_job ):
116116 job = submit_job (script = create_job_script_multi_step ())
117117
118- time . sleep ( util .WAIT_SECS_SLURMCTLD )
118+ util .wait ( )
119119 steps = JobSteps .load (job )
120120 assert len (steps ) == 3
121121 assert ("batch" in steps and
@@ -124,7 +124,7 @@ def test_cancel(submit_job):
124124
125125 steps [0 ].cancel ()
126126
127- time . sleep ( util .WAIT_SECS_SLURMCTLD )
127+ util .wait ( )
128128 steps = JobSteps .load (job )
129129 assert len (steps ) == 2
130130 assert ("batch" in steps and
@@ -135,7 +135,7 @@ def test_modify(submit_job):
135135 steps = "srun -t 20 sleep 100"
136136 job = submit_job (script = create_job_script_multi_step (steps ))
137137
138- time . sleep ( util .WAIT_SECS_SLURMCTLD )
138+ util .wait ( )
139139 step = JobStep .load (job , 0 )
140140 assert step .time_limit == 20
141141
@@ -150,7 +150,7 @@ def test_send_signal(submit_job):
150150 steps = "srun -t 10 sleep 100"
151151 job = submit_job (script = create_job_script_multi_step (steps ))
152152
153- time . sleep ( util .WAIT_SECS_SLURMCTLD )
153+ util .wait ( )
154154 step = JobStep .load (job , 0 )
155155 assert step .state == "RUNNING"
156156
@@ -159,7 +159,7 @@ def test_send_signal(submit_job):
159159
160160 # Make sure the job is actually cancelled.
161161 # If a RPCError is raised, this means the Step got cancelled.
162- time . sleep ( util .WAIT_SECS_SLURMCTLD )
162+ util .wait ( )
163163 with pytest .raises (RPCError ):
164164 step = JobStep .load (job , 0 )
165165
@@ -173,5 +173,5 @@ def test_load_with_wrong_step_id(submit_job):
173173
174174def test_parse_all (submit_job ):
175175 job = submit_job ()
176- time . sleep ( util .WAIT_SECS_SLURMCTLD )
176+ util .wait ( )
177177 JobStep .load (job , "batch" ).to_dict ()
0 commit comments