[test optimization] Fix attempt to fix in mocha parallel mode #7772
[test optimization] Fix attempt to fix in mocha parallel mode #7772juan-fernandez merged 7 commits intomasterfrom
Conversation
…6078) The worker was missing the `retry` event handler, causing retried test attempts to be reported with wrong status (pass instead of fail) or silently dropped depending on afterEach hook presence. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Pass isFlakyTestRetriesEnabled and flakyTestRetriesCount config from the main process to parallel workers via Mocha options, following the same pattern used for EFD and Test Management. Also fix runnableWrapper in the worker to receive the config so this.retries() is called. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Overall package sizeSelf size: 4.97 MB Dependency sizes| name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.0.0 | 81.15 kB | 815.98 kB | | dc-polyfill | 0.1.10 | 26.73 kB | 26.73 kB |🤖 This report was automatically generated by heaviest-objects-in-the-universe |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7772 +/- ##
==========================================
- Coverage 80.36% 80.34% -0.03%
==========================================
Files 743 743
Lines 32296 32296
==========================================
- Hits 25955 25948 -7
- Misses 6341 6348 +7 Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This comment has been minimized.
This comment has been minimized.
BenchmarksBenchmark execution time: 2026-03-16 11:33:10 Comparing candidate commit b556541 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 230 metrics, 30 unstable metrics. |
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Uncomment and wire up testManagementAttemptToFixRetries config flow from main process to workers. Also remove stale comment in utils.js about flaky test retries not working in parallel mode. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…ARALLEL_MODE Now that attempt-to-fix works in parallel mode, remove the capability gate so the backend knows Mocha supports ATF in parallel. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
6ad2e8a to
7d0fe01
Compare
The base branch was changed.
Remove UNSUPPORTED_ATTEMPT_TO_FIX_FRAMEWORKS_PARALLEL_MODE (now empty) and simplify isAttemptToFixSupported. Update parallel capabilities test to expect ATF capability '5'. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
What does this PR do?
Enables Attempt to Fix (ATF) in Mocha's parallel mode by wiring up
testManagementAttemptToFixRetriesfrom the main process to workers.Motivation
Building on the base branch which added the retry handler and ATR support to parallel workers, ATF was the only retry-based feature still disabled for parallel mode. The config just needed to be uncommented and passed to workers following the same pattern already used by other features.
Additional Notes
_ddTestManagementAttemptToFixRetriesconfig passthrough in bothmain.js(BufferedWorkerPool.runhook) andworker.js(Mocha.prototype.runhook).utils.js.options.delaywhich Mocha doesn't support in parallel).