Skip to content

Commit

Permalink
cherry-pick(#30135): chore: do not exit UI mode upon page reload
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelfeldman committed Mar 26, 2024
1 parent 757f308 commit 75776db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,6 @@ class StdinServer implements Transport {
}

onclose() {
gracefullyProcessExitDoNotHang(0);
}

sendEvent?: (method: string, params: any) => void;
Expand Down
3 changes: 2 additions & 1 deletion packages/playwright/src/runner/testServer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class TestServerDispatcher implements TestServerInterface {
this._configFile = configFile;
this.transport = {
dispatch: (method, params) => (this as any)[method](params),
onclose: () => gracefullyProcessExitDoNotHang(0),
onclose: () => {},
};
this._globalWatcher = new Watcher('deep', () => this._dispatchEvent('listChanged', {}));
this._testWatcher = new Watcher('flat', events => {
Expand Down Expand Up @@ -392,6 +392,7 @@ async function innerRunTestServer(configFile: string | undefined, options: { hos
const testServer = new TestServer(configFile);
const cancelPromise = new ManualPromise<void>();
const sigintWatcher = new SigIntWatcher();
process.stdin.on('close', () => gracefullyProcessExitDoNotHang(0));
void sigintWatcher.promise().then(() => cancelPromise.resolve());
try {
const server = await testServer.start(options);
Expand Down

0 comments on commit 75776db

Please sign in to comment.