Skip to content

Commit 75776db

Browse files
committed
cherry-pick(#30135): chore: do not exit UI mode upon page reload
1 parent 757f308 commit 75776db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

packages/playwright-core/src/server/trace/viewer/traceViewer.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,6 @@ class StdinServer implements Transport {
229229
}
230230

231231
onclose() {
232-
gracefullyProcessExitDoNotHang(0);
233232
}
234233

235234
sendEvent?: (method: string, params: any) => void;

packages/playwright/src/runner/testServer.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ class TestServerDispatcher implements TestServerInterface {
9898
this._configFile = configFile;
9999
this.transport = {
100100
dispatch: (method, params) => (this as any)[method](params),
101-
onclose: () => gracefullyProcessExitDoNotHang(0),
101+
onclose: () => {},
102102
};
103103
this._globalWatcher = new Watcher('deep', () => this._dispatchEvent('listChanged', {}));
104104
this._testWatcher = new Watcher('flat', events => {
@@ -392,6 +392,7 @@ async function innerRunTestServer(configFile: string | undefined, options: { hos
392392
const testServer = new TestServer(configFile);
393393
const cancelPromise = new ManualPromise<void>();
394394
const sigintWatcher = new SigIntWatcher();
395+
process.stdin.on('close', () => gracefullyProcessExitDoNotHang(0));
395396
void sigintWatcher.promise().then(() => cancelPromise.resolve());
396397
try {
397398
const server = await testServer.start(options);

0 commit comments

Comments
 (0)