Skip to content

Fix flaky tests and improve the main workflow#7102

Merged
gonzaloriestra merged 2 commits intomainfrom
fix-flaky-tests-main
Mar 26, 2026
Merged

Fix flaky tests and improve the main workflow#7102
gonzaloriestra merged 2 commits intomainfrom
fix-flaky-tests-main

Conversation

@gonzaloriestra
Copy link
Contributor

WHY are these changes introduced?

There are some flaky tests:

Also, the main checks are more unstable than the PR ones.

WHAT is this pull request doing?

  • build.test.ts: downloadBinary from ./binaries.js was never mocked, causing real HTTP requests to download WASM binaries on CI. Added a partial mock to stub it as a no-op.
  • http-reverse-proxy.test.ts: server.listen() calls were not awaited, so target servers could be unreachable when the proxy forwards the first request. The proxy's error handler logged warnings but never responded to the client, hanging fetch() forever. Wrapped all listen()/close() calls in promises.
  • tests-main.yml: Added --pool forks on macOS to match tests-pr.yml, preventing thread-level resource contention that contributed to flakiness only on main.

How to test your changes?

CI

Measuring impact

How do we know this change was effective? Please choose one:

  • n/a - this doesn't need measurement, e.g. a linting rule or a bug-fix
  • Existing analytics will cater for this addition
  • PR includes analytics changes to measure impact

Checklist

  • I've considered possible cross-platform impacts (Mac, Linux, Windows)
  • I've considered possible documentation changes

@github-actions
Copy link
Contributor

Coverage report

St.
Category Percentage Covered / Total
🟢 Statements 82.26% 14923/18141
🟡 Branches 74.74% 7356/9842
🟢 Functions 81.37% 3774/4638
🟢 Lines 82.64% 14109/17072

Test suite run success

3929 tests passing in 1512 suites.

Report generated by 🧪jest coverage report action from da23406

@gonzaloriestra gonzaloriestra marked this pull request as ready for review March 26, 2026 10:18
@gonzaloriestra gonzaloriestra requested a review from a team as a code owner March 26, 2026 10:18
@github-actions
Copy link
Contributor

We detected some changes at packages/*/src and there are no updates in the .changeset.
If the changes are user-facing, run pnpm changeset add to track your changes and include them in the next release CHANGELOG.

Caution

DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release.

Copy link
Contributor Author

gonzaloriestra commented Mar 26, 2026

Merge activity

  • Mar 26, 10:45 AM UTC: A user started a stack merge that includes this pull request via Graphite.
  • Mar 26, 10:45 AM UTC: @gonzaloriestra added this pull request to the GitHub merge queue with Graphite.

@gonzaloriestra gonzaloriestra added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit 74e0717 Mar 26, 2026
30 checks passed
@gonzaloriestra gonzaloriestra deleted the fix-flaky-tests-main branch March 26, 2026 10:51
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