Skip to content

Flaky CI Failure: browser-sdk Dm 'should stream messages' — expected 2 streamed messages but got 1 #3851

Description

@github-actions

Flaky CI Failure: browser-sdk Dm 'should stream messages' — expected 2 streamed messages but got 1

Workflow: Test
Failed run: https://github.com/xmtp/libxmtp/actions/runs/29293048133
Commit: 41b9afb
Failed jobs: test-browser-sdk / Test (browser-sdk) shard 3

Summary

The Dm > should stream messages test in test/Dm.test.ts failed an assertion that the stream received 2 messages. Only 1 message was received before the stream completed, suggesting a race condition in message streaming where the second message arrives after the stream consumer has already stopped listening. All other 196 browser-sdk tests passed in this run.

Error Details

FAIL  chromium  test/Dm.test.ts > Dm > should stream messages
AssertionError: expected 1 to be 2 // Object.is equality

- Expected
+ Received

- 2
+ 1

 ❯ test/Dm.test.ts:186:18

    184|     expect(message).toBeDefined();
    185|   }
    186|   expect(count).toBe(2);
       |                  ^
    187|   expect(streamedMessages).toEqual(["gm", "gm2"]);

error: recipe `test-browser-sdk-ci` failed on line 41 with exit code 1

Analysis

This is a test code failure (likely a race condition / flaky streaming test), not an infrastructure failure. The test streams DM messages and asserts 2 messages are received, but only 1 arrives within the test's window. This pattern — stream consumers missing the last message — is consistent with timing sensitivity in streaming tests. A similar flaky pattern has been observed in the node-sdk streaming tests (#3831). The affected area is test/Dm.test.ts around line 186 in the browser-sdk test suite.


Reported by Flaky Failure Watcher

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions