cultnet-rs presence publisher tests: tighten the timeout overrun bound to 1 s plus 250 ms
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
c8c02110fb
commit
65338cfec2
1 changed files with 7 additions and 5 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Reference in a new issue