You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
test(realtime): wait for the matching event when creating an index - #14432
RealtimeConsoleClientTest::testIndexesCollectionAPI failed on the 2.5.0 prep PR (#14422): Failed asserting that an array contains 'databases.….collections.….indexes.*.create' at line 621.
It's the race that 217bb21 fixed for the index delete tests. createCollectionWithAttribute() returns once a GET shows the attribute available, but the database worker can publish that attribute's available update after the GET returns. It then lands on the socket the test just opened, ahead of the index create event, and the test reads it as the index event.
The index create and index available reads in testIndexesCollectionAPI and testIndexesTablesAPI now use receiveUntilEvent(), which skips unrelated frames until the matching event arrives. The assertions on the matched event are unchanged.
This PR adds a single new e2e test exercising the Realtime service from the console-client side: it subscribes to collection attribute and index events and asserts streamed events arrive with the expected payloads and ordering.
New RealtimeConsoleClientTest e2e suite covering realtime subscription to collection attribute/index create and update events, using the shared receiveUntilEvent helper with bounded timeouts.
The event-aware reads address the described ordering race and preserve the assertions for the expected index events.
Updated the collection and tables index realtime tests to wait for the matching create and available events while skipping unrelated websocket frames. The existing assertions on the matched event payloads and channels remain in place.
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
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.
RealtimeConsoleClientTest::testIndexesCollectionAPIfailed on the 2.5.0 prep PR (#14422):Failed asserting that an array contains 'databases.….collections.….indexes.*.create'at line 621.It's the race that 217bb21 fixed for the index delete tests.
createCollectionWithAttribute()returns once a GET shows the attributeavailable, but the database worker can publish that attribute'savailableupdate after the GET returns. It then lands on the socket the test just opened, ahead of the index create event, and the test reads it as the index event.The index create and index
availablereads intestIndexesCollectionAPIandtestIndexesTablesAPInow usereceiveUntilEvent(), which skips unrelated frames until the matching event arrives. The assertions on the matched event are unchanged.Closes #14433