test(client): expand blocking and async conformance coverage #96

Merged
Lochnair merged 2 commits from test/client-driver-conformance into main 2026-08-15 03:11:37 +00:00
Showing only changes of commit e1bdd7920e - Show all commits
@@ -1316,6 +1316,9 @@ fn blocking_and_async_roll_back_a_failed_open_and_accept_a_retry() {
assert_eq!(probe_sequences(&async_sent), [0]);
assert_eq!(reply_sequences(&blocking_reply), [0]);
assert_eq!(reply_sequences(&async_reply), [0]);
assert_eq!(blocking_sent.len(), async_sent.len());
assert_eq!(blocking_reply.len(), async_reply.len());
assert_eq!(blocking_close.len(), async_close.len());
assert_matching_event_shape(&blocking_close[0], &async_close[0]);
}
@@ -1357,6 +1360,10 @@ fn blocking_and_async_complete_every_caller_paced_probe() {
assert_eq!(probe_sequences(&async_sent), expected);
assert_eq!(reply_sequences(&blocking_replies), expected);
assert_eq!(reply_sequences(&async_replies), expected);
// Compare the whole emitted streams, not just the probe and reply events
// the sequence helpers keep: an extra event on either side is a difference.
assert_eq!(blocking_sent.len(), async_sent.len());
assert_eq!(blocking_replies.len(), async_replies.len());
for (blocking, asynchronous) in blocking_sent.iter().zip(&async_sent) {
chatgpt-codex-connector[bot] commented 2026-08-14 18:45:19 +00:00 (Migrated from github.com)
Review

P2 Badge Assert event-list lengths before zipping

If either driver emits an additional trailing event, these zip loops silently stop at the shorter list, while probe_sequences and reply_sequences filter out non-probe events; the conformance test can therefore pass despite observably different event streams. Assert equal vector lengths before comparing their elements so the test protects full emitted-event equivalence.

AGENTS.md reference: AGENTS.md:L89-L91

Useful? React with 👍 / 👎.

**<sub><sub>![P2 Badge](https://img.shields.io/badge/P2-yellow?style=flat)</sub></sub> Assert event-list lengths before zipping** If either driver emits an additional trailing event, these `zip` loops silently stop at the shorter list, while `probe_sequences` and `reply_sequences` filter out non-probe events; the conformance test can therefore pass despite observably different event streams. Assert equal vector lengths before comparing their elements so the test protects full emitted-event equivalence. AGENTS.md reference: [AGENTS.md:L89-L91](https://github.com/Lochnair/irtt-rs/blob/150ee4fd3b8a16976cadc74f8edc694a397b0ffd/AGENTS.md#L89-L91) Useful? React with 👍 / 👎.
Lochnair commented 2026-08-14 18:55:04 +00:00 (Migrated from github.com)
Review

Agreed — event-list lengths are now asserted before both zip loops (and for the sent/reply/close lists in the retry test), so an extra event the sequence helpers filter out no longer passes silently.

🤖 Addressed by Claude Code

Agreed — event-list lengths are now asserted before both zip loops (and for the sent/reply/close lists in the retry test), so an extra event the sequence helpers filter out no longer passes silently. _🤖 Addressed by [Claude Code](https://claude.com/claude-code)_
assert_matching_event_shape(blocking, asynchronous);
}