Skip to content

test(node): Await the child exit in the "should exit" integration tests - #25277

Merged
JPeer264 merged 1 commit into
jp/flaky-bun-serve-spiesfrom
jp/flaky-node-should-exit
Oct 14, 2026
Merged

JPeer264 merged 1 commit into
jp/flaky-bun-serve-spiesfrom
jp/flaky-node-should-exit

Conversation

@JPeer264

Copy link
Copy Markdown
Member

This adds exited() to the integration test runner. It resolves on the close event of the child process. The four "should exit" tests in thread-blocked-native and anr now await it. Before, thread-blocked-native waited a fixed 5 s, and anr checked every 100 ms. childHasExited() had no other users and is removed.

Why

Under CI load the child process sometimes needed more than 5 s to exit, so the test failed although the process exited correctly. The describe timeout still fails a child that never exits.

Failed on CI: https://github.com/getsentry/sentry-javascript/actions/runs/38031718055/job/114154033567

@JPeer264
JPeer264 added this pull request to stack #25283 October 12, 2026 12:19
@JPeer264
JPeer264 marked this pull request as ready for review October 12, 2026 12:23
@JPeer264 JPeer264 self-assigned this Oct 12, 2026
@JPeer264
JPeer264 requested a review from andreiborza October 12, 2026 12:23
@JPeer264
JPeer264 requested a review from a team as a code owner October 12, 2026 12:23
@JPeer264
JPeer264 requested review from mydea and nicohrubec and removed request for a team October 12, 2026 12:23
@JPeer264
JPeer264 force-pushed the jp/flaky-node-should-exit branch from 3022308 to 9f7475f Compare October 12, 2026 12:33
@JPeer264
JPeer264 removed this pull request from stack #25283 October 13, 2026 15:29
@JPeer264
JPeer264 added this pull request to stack #25335 October 13, 2026 15:29
The thread-blocked-native tests waited a fixed 5 seconds and then checked
that the child process had exited. Under load in CI the child sometimes
needs longer, so the test failed. The ANR tests polled every 100 ms.

The runner now has `exited()`, which resolves on the child's `close`
event. Both suites await it, and the describe timeout still fails a child
that never exits. `childHasExited()` had no other users and is removed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JPeer264
JPeer264 force-pushed the jp/flaky-node-should-exit branch from 9f7475f to cfbd5f7 Compare October 13, 2026 15:36
@JPeer264
JPeer264 merged commit 00d0535 into develop Oct 14, 2026
110 of 139 checks passed
@JPeer264
JPeer264 deleted the jp/flaky-node-should-exit branch October 14, 2026 06:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants