Conversation
The _enqueue method stores _testOpQueue as the chained promise for
serialization. If fn() ever rejects, next.then(() => {}) propagates
the rejection to _testOpQueue which has no handler attached until the
next _enqueue call arrives in a later event loop turn. Node.js detects
this as an unhandled rejection and terminates the process.
The error IS still propagated to the caller via 'return await next' —
the added no-op rejection handler only prevents the queue from being
poisoned while maintaining proper error propagation semantics.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Test results for "MCP"2 failed 7013 passed, 1058 skipped Merge workflow run. |
Contributor
Test results for "tests 1"4 flaky41651 passed, 851 skipped Merge workflow run. |
dgozman
approved these changes
May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
_enqueuethat crashes the MCP server on Windows CI_testOpQueueso the queue always resolvesThe error still propagates to callers via
return await next— this only prevents the serialization queue from becoming permanently broken.Fixes flaky
test_run should stop when abortedon Windows (introduced in #40582).