Repository navigation
test(binding-mqtt): cover identical re-subscribe receiving a suback - #3155
Merged
Conversation
This was referenced Nov 12, 2026
jfallows
force-pushed
the
feature/mqtt-shared-subscriptions-9-resubscribe-tests
branch
from
November 12, 2026 21:45
d164ad4 to
86cf318
Compare
jfallows
force-pushed
the
feature/mqtt-shared-subscriptions-9-resubscribe-tests
branch
from
November 17, 2026 08:15
86cf318 to
76bf783
Compare
Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01SiHVoWQfGhyeZZgaux58Sm
jfallows
force-pushed
the
feature/mqtt-shared-subscriptions-9-resubscribe-tests
branch
from
November 17, 2026 18:36
76bf783 to
81c7407
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
openSubscribeStreamsencodes the SUBACK immediately when no stream is awaiting a reply, andawaitReplyskips streams that are already reply-open.New scenarios (spec pair + spec IT + runtime IT each):
subscribe.resubscribe.identicalsubscribe.shared.resubscribe.identicalEach 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./mvnw clean install): BUILD SUCCESSopenSubscribeStreamsshows it also encodes the SUBACK unconditionally for a non-implicit subscribe, so this is not a regressionGenerated by Claude Code