From d5e9098908025e4d3bbee18e5e7671ab45cfd709 Mon Sep 17 00:00:00 2001 From: TShapinsky Date: Wed, 8 Jan 2025 15:42:14 -0700 Subject: [PATCH] fix step duration --- tests/worker/jobs/step_run_mock_job.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/worker/jobs/step_run_mock_job.py b/tests/worker/jobs/step_run_mock_job.py index 333e1d35..5fcbfaaa 100644 --- a/tests/worker/jobs/step_run_mock_job.py +++ b/tests/worker/jobs/step_run_mock_job.py @@ -15,6 +15,7 @@ def __init__(self, run_id, realtime, timescale, external_clock, start_datetime, StepRunBase.__init__(self, run_id, realtime, timescale, external_clock, start_datetime, end_datetime, skip_site_init=True, skip_stop_db_writes=True) self.options.warmup_is_first_step = True self.options.timestep_duration = timedelta(minutes=1) + self.simulation_step_duration = 1 self.run.sim_time = self.options.start_datetime def get_sim_time(self) -> datetime.datetime: @@ -25,9 +26,9 @@ def initialize_simulation(self): @message def set_simulation_step_duration(self, simulation_step_duration): - self.options.timestep_duration = timedelta(minutes=simulation_step_duration) + self.simulation_step_duration = simulation_step_duration @message def advance(self): - sleep(self.options.timestep_duration) + sleep(self.simulation_step_duration) self.run.sim_time = self.run.sim_time + self.options.timestep_duration