test(client): avoid scheduler-dependent timing assertions

This commit is contained in:
Nils Andreas Svee committed 2026-10-02 23:16:48 +07:00
1 parent bfaa0a436f
commit d571315068
2 files changed
+57 -38

No files matched your search

+5 -2
View File
@@ -108,8 +108,11 @@ fn assert_kernel_send_endpoint(event: &ClientEvent, before_send: SystemTime) {
let selected =
i128::from(timing.receive_wall_ns.unwrap()) - one_way.client_to_server.unwrap().as_nanos();
assert!(selected >= ns(before_send));
assert!(
selected < ns(sent_at.wall),
// TX_SOFTWARE may arrive before or after send returns; only equality
// identifies the userspace fallback. Receipt remains the upper bound.
assert_ne!(
selected,
ns(sent_at.wall),
"TX timestamp was not observed; userspace fallback is insufficient"
);
assert!(selected <= ns(received_at.wall));