Repository navigation
UTS: keep realtime open in batch_presence restricted-key test - #586
Open
owenpearson wants to merge 1 commit into
Open
owenpearson wants to merge 1 commit into
owenpearson wants to merge 1 commit into
Conversation
rest/integration/RSC24/restricted-key-channel-failure-1 closed the realtime connection during setup, then asserted that batchPresence finds the member that connection entered. Closing the connection removes the member, so the allowed channel's result came back with no presence. Move the close into Cleanup, as the file's other two tests do. Also replace the stale comment naming a "batch-allowed" channel with the capability entry the test relies on, "channel6":["*"]. Closes #548 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch was successfully deployed
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.
Closes #548
What changed
In
uts/rest/integration/batch_presence.md, testrest/integration/RSC24/restricted-key-channel-failure-1:AWAIT realtime.close()from Setup into Cleanup. Setup now has the same "keep realtime open" note asempty-channel-presence-2. Cleanup used to say "No cleanup needed" because the client was already closed; it now closes the client, like the two other tests in the file.batch-allowed", but no channel by that name appears anywhere in the file. The new comment names the capability entry the test relies on,"channel6":["*"].The Test ID and the assertions are unchanged.
Why
A presence member belongs to the connection that entered it. Closing the realtime client during setup removes
member-1before the RESTbatchPresencequery runs, so the allowed channel's result has nopresencekey andsuccess.presence.length == 1can never pass. #548 has the sandbox measurements: 3 runs out of 3, checked at +0s, +1s and +3s after the close. This isn't a race.successCount,failureCountand the BGF2 failure-result assertions are not affected.Correction to the issue's suggested fix
The issue suggested the comment "capability only for
channel6". That's inaccurate.keys[2]inably-common/test-resources/test-app-setup.jsonalso grantschannel0tochannel5(channel4andchannel5includepresence). The new comment names the specific entry,"channel6":["*"], and says the key grants nothing ondenied_channel.npm run lintpasses inbuild/.🤖 Generated with Claude Code