From 31290bab376695187e3edcdc28eb9ae1d228aaa9 Mon Sep 17 00:00:00 2001 From: Tim Pillinger Date: Fri, 18 Oct 2024 11:49:46 +0100 Subject: [PATCH] re-added missing test --- tests/integration/run_modes/test_simulation.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/integration/run_modes/test_simulation.py b/tests/integration/run_modes/test_simulation.py index debbf117d7a..c78f6e139dc 100644 --- a/tests/integration/run_modes/test_simulation.py +++ b/tests/integration/run_modes/test_simulation.py @@ -460,3 +460,15 @@ async def test_settings_broadcast( assert itask.try_timers['execution-retry'].delays == [2.0, 2.0, 2.0] # n.b. rtconfig should remain unchanged, lest we cancel broadcasts: assert itask.tdef.rtconfig['execution retry delays'] == [5.0, 5.0] + + +async def test_db_submit_num( + flow, one_conf, scheduler, run, complete, db_select +): + """Test simulation mode correctly increments the submit_num in the DB.""" + schd = scheduler(flow(one_conf), paused_start=False) + async with run(schd): + await complete(schd, '1/one') + assert db_select(schd, False, 'task_states', 'submit_num', 'status') == [ + (1, 'succeeded'), + ]