Skip to content

Commit de7c73c

Browse files
committed
add sleep to allow mock step run to fall behind
1 parent d0bc4d2 commit de7c73c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tests/worker/jobs/step_run_mock_job.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ def __init__(self, run_id, realtime, timescale, external_clock, start_datetime,
1717
self.options.timestep_duration = timedelta(minutes=1)
1818
self.run.sim_time = self.options.start_datetime
1919

20-
def step(self):
21-
sleep(self.simulation_step_duration)
22-
self.set_run_time(self.run.sim_time + self.time_per_step())
23-
2420
def get_sim_time(self) -> datetime.datetime:
2521
return self.run.sim_time
2622

@@ -33,4 +29,5 @@ def set_simulation_step_duration(self, simulation_step_duration):
3329

3430
@message
3531
def advance(self):
32+
sleep(self.options.timestep_duration)
3633
self.run.sim_time = self.run.sim_time + self.options.timestep_duration

0 commit comments

Comments
 (0)