feat(test runner): cancel operations on test end via default abort signal#41707
feat(test runner): cancel operations on test end via default abort signal#41707Skn0tt wants to merge 2 commits into
Conversation
…gnal Inject a default AbortSignal that fires on test end into every client operation, instead of relying on closing the context to unblock in-flight operations.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Test results for "MCP"2 failed 7733 passed, 1248 skipped Merge workflow run. |
Test results for "tests 1"9 failed 8 flaky49499 passed, 1161 skipped Merge workflow run. |
Summary
Explores replacing the "close the context at test end to unblock in-flight operations" teardown with a default
AbortSignalthat fires on test end and flows into every client operation.playwright._defaultOperationSignalfor the duration of the test;workerMainaborts it afterafterEachwith aTestEndedError(reason).channelOwnermerges this default signal into every operation viacombineSignals.connectionrewrites the aborted error message from theTestEndedErrorreason, preserving the existing "Test ended." / "Test timeout of Nms exceeded." wording.context.close()no longer needs an explicit reason — the signal drives cancellation.Draft / exploration — opening for discussion.