Skip to content

Commit 8637ea5

Browse files
committed
test: tighten scheduler latency bounds to 500 ms
Measured tick-to-queued and post-lease catch-up stay under 20 ms. A scheduler that stops waking at the next due time and falls back to its one-second poll queues ticks 0.7-0.9 s late; 1.5 s missed that, 500 ms catches it.
1 parent 374264c commit 8637ea5

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎crates/sqlbuild-orchestration/tests/scheduler/ticks/test_latency.rs‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,15 @@ fn given_a_running_scheduler_and_a_stopped_leader_when_times_fall_due_then_ticks
2424
description: "SQLite scheduler latency",
2525
backend: Backend::Sqlite,
2626
expected_queued_ticks: 3,
27-
expected_max_tick_to_queued: TimeDelta::milliseconds(1_500),
28-
expected_max_failover_catch_up: TimeDelta::milliseconds(1_500),
27+
expected_max_tick_to_queued: TimeDelta::milliseconds(500),
28+
expected_max_failover_catch_up: TimeDelta::milliseconds(500),
2929
},
3030
SchedulerLatencyTestCase {
3131
description: "PostgreSQL scheduler latency",
3232
backend: Backend::Postgres,
3333
expected_queued_ticks: 3,
34-
expected_max_tick_to_queued: TimeDelta::milliseconds(1_500),
35-
expected_max_failover_catch_up: TimeDelta::milliseconds(1_500),
34+
expected_max_tick_to_queued: TimeDelta::milliseconds(500),
35+
expected_max_failover_catch_up: TimeDelta::milliseconds(500),
3636
},
3737
];
3838
for test_case in test_cases {

0 commit comments

Comments
 (0)