From 65338cfec2a7212c30c37353341041e816316a2c Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 28 Nov 2026 14:47:36 +0100 Subject: [PATCH] cultnet-rs presence publisher tests: tighten the timeout overrun bound to 1 s plus 250 ms Co-Authored-By: Claude Opus 5.5 --- .../idunn_runtime_provider/tests/odin_publisher.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/packages/cultnet-rs/src/idunn_runtime_provider/tests/odin_publisher.rs b/packages/cultnet-rs/src/idunn_runtime_provider/tests/odin_publisher.rs index a0976871..0894b547 100644 --- a/packages/cultnet-rs/src/idunn_runtime_provider/tests/odin_publisher.rs +++ b/packages/cultnet-rs/src/idunn_runtime_provider/tests/odin_publisher.rs @@ -663,8 +663,10 @@ mod lease_wait { /// An unreachable Odin with connect and ack waits far longer than the /// caller's timeout: the wait must return at the timeout, over by at most - /// one receive slice plus scheduling. The slack is 400 ms; unbounded, the - /// overrun is the 2 s connect wait, so the bound is not a race. + /// one receive slice plus scheduling. The timeout is 1 s and the slack + /// 250 ms, so a deadline 300 ms late or at twice the timeout both fail; + /// unbounded, the overrun is the 2 s connect wait, so the bound is not a + /// race. #[test] fn lease_wait_never_overruns_the_timeout() -> Result<()> { let dead = dead_address(); @@ -677,8 +679,8 @@ mod lease_wait { ..TEST_CADENCE }; let publisher = publisher_for(&signer, cadence)?; - let timeout = Duration::from_millis(300); - let slack = Duration::from_millis(400); + let timeout = Duration::from_secs(1); + let slack = Duration::from_millis(250); let started = Instant::now(); let refused = refusal(publisher.wait_for_write_lease(&mut signer, timeout)); @@ -708,7 +710,7 @@ mod lease_wait { }; let publisher = publisher_for(&signer, cadence)?; let timeout = Duration::from_millis(400); - let slack = Duration::from_millis(300); + let slack = Duration::from_millis(250); let started = Instant::now(); let refused = refusal(publisher.wait_for_write_lease(&mut signer, timeout));