diff options
| author | JJ Liebig <jonathan.liebig@gmail.com> | 2026-09-13 04:17:50 +0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-09-13 02:17:50 +0200 |
| commit | 3b9f58b70ed50f80e8aaa99ead2e4ccfa2c5c4ba (patch) | |
| tree | 9a23e4ba6f054783b36f65e1048ea80925ecda0e /src | |
| parent | aa6b531a423067d8a71c2a57b41185bff17036be (diff) | |
fix: deflake windows endpoint flush drain test (#4021)
The polling peer drains at production's 2ms Windows read cadence, so a 1 MiB
frame took ~5.5s locally and exceeded the test's 10s flush deadline under CI
load. Use a 256 KiB frame, still well above the 64 KiB batch limit, and a 30s
deadline so the assertion no longer depends on CI scheduling.
Diffstat (limited to 'src')
| -rw-r--r-- | src/client/endpoint/writer.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/client/endpoint/writer.rs b/src/client/endpoint/writer.rs index 56c472cd..f7d67454 100644 --- a/src/client/endpoint/writer.rs +++ b/src/client/endpoint/writer.rs @@ -373,16 +373,18 @@ mod tests { done.send((first, second)).unwrap(); }); let input = ClientMessage::Input { - data: vec![b'x'; 1024 * 1024], + // Comfortably above MAX_BATCH_BYTES, but small enough that the polling peer's + // Windows 2ms read cadence drains it well within the flush deadline under CI load. + data: vec![b'x'; 256 * 1024], }; transport.send(&input).unwrap(); transport.send(&ClientMessage::Detach).unwrap(); // Large-frame correctness must not depend on the registry's short exit grace period. transport - .flush(Instant::now() + Duration::from_secs(10)) + .flush(Instant::now() + Duration::from_secs(30)) .unwrap(); drop(transport); - let (first, second) = received.recv_timeout(Duration::from_secs(10)).unwrap(); + let (first, second) = received.recv_timeout(Duration::from_secs(30)).unwrap(); assert_eq!(first, input); assert_eq!(second, ClientMessage::Detach); reader.join().unwrap(); |
