Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix Windows browser process close test #34469

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/library/signals.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ test('should close the browser when the node process closes', async ({ startRemo
const remoteServer = await startRemoteServer('launchServer', { url: server.EMPTY_PAGE });
try {
if (isWindows)
execSync(`taskkill /pid ${remoteServer.child().pid} /T /F`, { stdio: 'ignore' });
console.log(execSync(`taskkill /pid ${remoteServer.child().pid} /T /F`, { stdio: 'inherit' }));
else
process.kill(remoteServer.child().pid);
} catch (error) {
Expand All @@ -40,6 +40,7 @@ test('should close the browser when the node process closes', async ({ startRemo
// We might not get browser exitCode in time when killing the parent node process,
// so we don't check it here.
expect(await remoteServer.childExitCode()).toBe(isWindows ? 1 : 0);
expect(false).toBe(true);
});

test('should remove temp dir on process.exit', async ({ startRemoteServer, server, platform }, testInfo) => {
Expand Down
Loading