Skip to content

Flaky test: WebSocket ping interval test fails intermittently on macOS-latest #208

Closed as not planned

Description

@coderabbitai

Description

A flaky test was detected in the CI pipeline for PR #207.

Test Details

Test Name: WebSocket Tests Given a web socket connection with a ping interval, when the client side blocks, then the server socket closes

Location: test/web_socket/web_socket_test.dart:354

Platform: macOS-latest (Dart stable, upgrade)

Failure Details

The test failed on the first run attempt but passed on retry.

Expected behavior:

• emit an event that <Instance of 'TextDataReceived'>
• emit an event that CloseReceived:<CloseReceived(1001, )>
• be done

Actual behavior:

emitted • CloseReceived(1001, )
x Stream closed.
which didn't emit an event that <Instance of 'TextDataReceived'>

Error:

TimeoutException after 0:00:30.000000: Test timed out after 30 seconds.

Links

Observations

This appears to be a race condition or timing issue specific to macOS runners. The test expects to receive a TextDataReceived event before the CloseReceived event, but on macOS the close event is sometimes received first.

The test succeeded on retry, confirming its flaky nature.

Suggested Actions

  • Investigate the timing assumptions in the websocket ping interval test
  • Consider adding more lenient timing expectations for macOS platform
  • Review if the test's expectations about event ordering are too strict

Reported by: @SandPod in #207

Activity

  1. added
    bug
    on Oct 10, 2025
  2. added
    test
    on Oct 10, 2025
  3. removed their assignment
    on Oct 10, 2025
  4. moved this from Inbox 📫 to Backlog 🗂️ in Serverpod Frameworkson Oct 16, 2025
  5. nielsenko commented on Oct 16, 2025

    @nielsenko
    Collaborator
  6. nielsenko commented on Oct 28, 2025

    @nielsenko
    Collaborator
  7. nielsenko commented on Oct 30, 2025

    @nielsenko
    Collaborator

    again: https://github.com/serverpod/relic/actions/runs/18937352327/attempts/1?pr=256
    Bumping priority to 0. I guess this makes this issue the most important we have. Either that or we should re-evaluate the approach about bumping priority whenever we see a flaky test failure.

  8. marcelomendoncasoares commented on Jul 21, 2026

    @marcelomendoncasoares
    Collaborator

    Closing as it might have been fixed collaterally and never happened again.

  9. moved this from Backlog 🗂️ to Done 🚀 in Serverpod Frameworkson Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugtest

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions