Skip to content

Wait for the matching realtime event when creating an index in tests #14433

Closed

Description

@ChiragAgg5k

Tracks PR #14432.

Plan

Goal: Stop RealtimeConsoleClientTest::testIndexesCollectionAPI (and its tables twin) from flaking when a late attribute available update lands on the realtime socket ahead of the index create event (seen on the 2.5.0 prep PR #14422 as Failed asserting that an array contains 'databases.….collections.….indexes.*.create').

What changes (from #14432):

  • tests/e2e/Services/Realtime/RealtimeConsoleClientTest.php: in testIndexesCollectionAPI and testIndexesTablesAPI, the index create and index available reads use receiveUntilEvent() instead of a raw $client->receive(), skipping unrelated frames until the matching event arrives. Assertions on the matched event are unchanged.
  • Same approach as 217bb21, which fixed the race for the index delete tests.

Remaining steps: Linked PR is the full change.

Done when:

Activity

  1. self-assigned this
    on Oct 13, 2026
  2. added
    api / realtime
    product / databases
    sdk / cli
    on Oct 13, 2026
  3. ChiragAgg5k commented on Oct 14, 2026

    @ChiragAgg5k
    MemberAuthor

    Released in Appwrite 2.5.0 (includes #14432).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api / realtimeproduct / databasessdk / cli

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions