wifi-densepose/v2/crates/wifi-densepose-sensing-server/tests
ruv 2aeed32a72 fix(adr-115/test): per-test MQTT client_id so session-takeover doesn't break state test
The mqtt-integration test suite still failed `state_messages_published_
on_snapshot_broadcast` after the timing fix (5ed8e3451) — but with a
new symptom: 'expected ON state, got []'. The subscriber captured ZERO
messages on the presence state topic.

Root cause: all three integration tests built `client_id` as
`ruview-int-test-<pid>` — the same string for every test in the
sequential cargo-test run. MQTT brokers default to "session takeover":
when a new connect arrives with the same client_id as an existing
session, mosquitto disconnects the old one immediately.

Sequence on CI (`--test-threads=1`):
  1. discovery_topics_appear_on_broker connects (ruview-int-test-1234)
  2. test passes; publisher task continues running in background
  3. privacy_mode_suppresses_biometric_discovery connects (same id)
     → mosquitto kicks test 1's publisher mid-rumqttc-disconnect-handshake
  4. state_messages_published_on_snapshot_broadcast connects (same id)
     → mosquitto kicks test 2's publisher
     → test 3's publisher in turn races with the broker's cleanup
        and its first publishes may land in a half-cleaned session
     → state messages dropped silently

Fix: include a per-test label in the client_id
(`ruview-int-test-<pid>-<label>` — labels: "discovery", "privacy",
"state"). Each test gets its own MQTT session; no cross-test takeover.

Refs PR #778, issue #776.

Co-Authored-By: claude-flow <ruv@ruv.net>
2026-05-23 15:44:56 -04:00
..
introspection_latency.rs feat(introspection): I6 — regime-changed signal + per-frame analyze + honest ADR-099 D8 amendment 2026-05-13 23:29:37 -04:00
mqtt_integration.rs fix(adr-115/test): per-test MQTT client_id so session-takeover doesn't break state test 2026-05-23 15:44:56 -04:00
multi_node_test.rs fix(security): audit — fix RUSTSEC vulns, clippy warnings, dead code (#769) 2026-05-23 05:36:13 -04:00
rvf_container_test.rs fix(security): audit — fix RUSTSEC vulns, clippy warnings, dead code (#769) 2026-05-23 05:36:13 -04:00
vital_signs_test.rs fix(security): audit — fix RUSTSEC vulns, clippy warnings, dead code (#769) 2026-05-23 05:36:13 -04:00