Skip to content

rusquitto 1.9.2

Choose a tag to compare

@iamaliybi iamaliybi released this 05 Jul 22:59
a8c361c

Test coverage: a real end-to-end integration suite, plus documentation of the whole testing strategy. Addresses the audit's "Test Coverage & Reliability 7/10".

tests/integration.rs — 15 end-to-end tests

Each boots a real broker in-process and drives it over real TCP sockets with a minimal MQTT 5 client (built on mqttbytes). Unlike the unit tests (which run the connection state machine over an in-memory mock), these exercise the whole stack — accept loop, transport, routing, sessions, auth, and the cross-shard mesh — the way a client does:

CONNACK · QoS 0/1/2 full handshakes · downgrade-to-granted · retained replay + clear · +/# wildcards · unsubscribe · persistent-session offline-queue replay · will-on-abrupt-disconnect · malformed-frame survival · auth (bad password / anonymous rejection / success) · ACL enforcement · cross-shard delivery · shared-subscription exactly-once across shards.

Brokers are lazily started and shared per configuration, so the suite adds ~2 s to cargo test and runs in CI.

TESTING.md

The full strategy, layer by layer: unit (mock-stream state machine), integration (this suite), the adversarial battery, the crash-recovery and mTLS harnesses, soak, and the memory/throughput probes — with how to run each and the known gaps.

Changed

  • Logging init is now idempotent (try_init instead of init), so starting more than one broker in a single process — embedding, or the integration suite — is a no-op on the second call rather than a panic.

Verification

94 unit + 15 integration tests, clippy -D warnings clean, fmt clean.

Assets

  • rusquitto-x86_64-unknown-linux-gnu — x86-64 Linux binary
  • rusquitto-aarch64-unknown-linux-gnu — ARM64 Linux binary
  • rusquitto.config.toml — annotated reference configuration