From de7c73ca3d6dedf44d1df539bf651d89a7e6cae1 Mon Sep 17 00:00:00 2001 From: TShapinsky Date: Wed, 8 Jan 2025 15:40:13 -0700 Subject: [PATCH] add sleep to allow mock step run to fall behind --- tests/worker/jobs/step_run_mock_job.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/tests/worker/jobs/step_run_mock_job.py b/tests/worker/jobs/step_run_mock_job.py index 0c82d7c2..333e1d35 100644 --- a/tests/worker/jobs/step_run_mock_job.py +++ b/tests/worker/jobs/step_run_mock_job.py @@ -17,10 +17,6 @@ def __init__(self, run_id, realtime, timescale, external_clock, start_datetime, self.options.timestep_duration = timedelta(minutes=1) self.run.sim_time = self.options.start_datetime - def step(self): - sleep(self.simulation_step_duration) - self.set_run_time(self.run.sim_time + self.time_per_step()) - def get_sim_time(self) -> datetime.datetime: return self.run.sim_time @@ -33,4 +29,5 @@ def set_simulation_step_duration(self, simulation_step_duration): @message def advance(self): + sleep(self.options.timestep_duration) self.run.sim_time = self.run.sim_time + self.options.timestep_duration