test(client): strengthen assertions for session cleanup after peer closure

Update tests to ensure no packets at all are sent following a peer-initiated closure, rather than just checking for the absence of the close flag.
This commit is contained in:
Nils Andreas Svee committed 2026-06-20 23:08:00 +07:00
1 parent 97dc1b3f8d
commit c7d03c0358
2 files changed
+10 -10

No files matched your search

+5 -5
View File
@@ -288,11 +288,11 @@ mod tests {
socket
.set_read_timeout(Some(Duration::from_millis(250)))
.unwrap();
while let Some((packet, _)) = recv_request_timeout(&socket) {
assert_eq!(
packet[3] & flags::FLAG_CLOSE,
0,
"session cleanup must not send a close after peer close"
if let Some((packet, _)) = recv_request_timeout(&socket) {
panic!(
"session cleanup must not send any packet after peer close; flags={:?} len={}",
packet.get(3).copied(),
packet.len()
);
}
});