Skip to content

Add libzmq conformance tests#229

Merged
rgbkrk merged 5 commits intomasterfrom
libzmq-conformance-tests
Mar 4, 2026
Merged

Add libzmq conformance tests#229
rgbkrk merged 5 commits intomasterfrom
libzmq-conformance-tests

Conversation

@rgbkrk
Copy link
Copy Markdown
Member

@rgbkrk rgbkrk commented Mar 4, 2026

🎉 229 is my favorite prime number! 🎉

Summary

Adds more conformance tests that verify wire protocol compatibility between zmq.rs and the reference libzmq implementation.

Tests Added

  • router_dealer_compliant.rs (3 tests): Tests ROUTER/DEALER identity-based routing against libzmq, including multi-client scenarios
  • pub_sub_compliant_reverse.rs (2 tests): Tests our PUB socket with libzmq SUB sockets across TCP and IPC transports with topic filtering
  • reconnection_compliant.rs (2 tests, currently ignored): Documents reconnection behavior gaps - subscription resync after peer restart not fully implemented

All tests pass except 2 ignored tests that reveal known limitations for future work.

rgbkrk added 5 commits March 4, 2026 10:18
New conformance tests that verify wire protocol compatibility with libzmq:

- router_dealer_compliant.rs: Tests ROUTER/DEALER identity-based routing
  - Our ROUTER ↔ their DEALER (3 tests including multi-client)
  - Our DEALER ↔ their ROUTER

- pub_sub_compliant_reverse.rs: Tests our PUB with their SUB
  - Broadcast delivery to multiple subscribers
  - Topic filtering with different subscription patterns

- reconnection_compliant.rs: Tests reconnection behavior (currently ignored)
  - Reveals that subscription resync after peer restart isn't fully implemented
  - Documented as known limitation for future work

Total: 7 new tests (5 passing, 2 ignored)
- Add backticks around file reference in doc comment
- Combine duplicate match arms for recv_string error handling
- Add #[allow(dead_code)] to compliance helpers used by subset of tests
- Apply cargo fmt formatting fixes
- Remove Pipe trait helper that was after test module
- Remove unnecessary borrow in send_multipart call
- Apply cargo fmt to all test files
- Wrap URL in angle brackets for doc_markdown lint
- Replace redundant continue with empty match arm
- Convert loop/match to while let loop
@rgbkrk rgbkrk merged commit 2fdcab6 into master Mar 4, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant