Skip to content

test(binding-mqtt): cover identical re-subscribe receiving a suback - #3155

Merged
jfallows merged 1 commit into
feature/mqtt-shared-subscriptions-8-real-brokerfrom
feature/mqtt-shared-subscriptions-9-resubscribe-tests
Nov 17, 2026
Merged

jfallows merged 1 commit into
feature/mqtt-shared-subscriptions-8-real-brokerfrom
feature/mqtt-shared-subscriptions-9-resubscribe-tests

Conversation

@jfallows

Copy link
Copy Markdown
Contributor

Description

Part of #1801

Adds regression scenarios for a client re-sending SUBSCRIBE with a filter and options identical to an existing subscription, non-shared and shared ($share/consumer1/sensor/one).

The suspicion was that, since no new app stream is opened for an existing subscription, the pending SUBACK logic might have no stream BEGIN to wait on and no SUBACK would be sent (MQTT 5.0 §3.8.4 requires one per SUBSCRIBE). It is not real: openSubscribeStreams encodes the SUBACK immediately when no stream is awaiting a reply, and awaitReply skips streams that are already reply-open.

New scenarios (spec pair + spec IT + runtime IT each):

  • subscribe.resubscribe.identical
  • subscribe.shared.resubscribe.identical

Each expects a SUBACK per SUBSCRIBE with the correct packet id and reason code, and a single app subscribe stream.

No production code changes.

Stack

Layer 9 of the stack of PRs for #1801, based on #3154 (layer 8). See #3154 for the full table.

Test evidence

  • ./mvnw clean verify -pl specs/binding-mqtt.spec,runtime/binding-mqtt: green, checkstyle included
  • The full reactor build of this tip (./mvnw clean install): BUILD SUCCESS
  • Upstream flush traffic for the identical re-subscribe was not asserted
  • Not run against develop; reading develop's openSubscribeStreams shows it also encodes the SUBACK unconditionally for a non-implicit subscribe, so this is not a regression

Generated by Claude Code

@jfallows
jfallows force-pushed the feature/mqtt-shared-subscriptions-9-resubscribe-tests branch from 76bf783 to 81c7407 Compare November 17, 2026 18:36
@jfallows
jfallows merged commit 8f641d1 into develop Nov 17, 2026
98 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.

2 participants