Skip to content

Improve test suite to avoid flaky container event order - #101

Merged
clue merged 1 commit into
clue:1.xfrom
clue-labs:flaky-events
Oct 18, 2026
Merged

clue merged 1 commit into
clue:1.xfrom
clue-labs:flaky-events

Conversation

@clue

@clue clue commented Oct 18, 2026

Copy link
Copy Markdown
Owner

This changeset improves the test suite to avoid a flaky container event order. The test container could still be running when the test attached to it, so the die and attach events arrived in either order and failed 5 of the last 17 CI runs (counting reruns). The test now waits for the container to exit first, which also means it is never killed on removal, so the separate expectation for Docker before 20.10 (2020) is no longer needed. The race dates back to #61, the library itself is unchanged.

Builds on top of #98, #80 and #61

@clue clue added this to the v1.7.0 milestone Oct 18, 2026
@clue
clue requested a balanced review from Copilot October 18, 2026 00:28

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The focused test changes address the event-order race with no blocking issues identified.

No open issues 🎉

What changed in this PR

Stabilizes the container lifecycle test by waiting for exit before attaching, removing the event-order race without changing the library.

Changes:

  • Waits for container exit and verifies a zero exit status.
  • Replaces version-dependent event expectations with one ordered sequence.
File Description
tests/​FunctionalClientTest.php Waits for exit before attaching and simplifies event assertions.

Review effort: Balanced

@clue
clue merged commit 75ff6fd into clue:1.x Oct 18, 2026
15 checks passed
@clue
clue deleted the flaky-events branch October 18, 2026 00:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants