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 3 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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Move composition of the "assertion was aborted" message from the server to the client. The server now always sends the natural received/error diagnostic, and the client composes the generic abort message only for user-supplied signal aborts. This keeps rich expected/received output when an assertion is interrupted by the default test-end abort signal.
Test results for "MCP"1 failed 7759 passed, 1249 skipped Merge workflow run. |
Test results for "tests 1"8 failed 6 flaky49510 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.