don't let timeout prevent event loop exit
This commit is contained in:
parent
5ae52f072f
commit
bf3012031e
|
|
@ -135,10 +135,10 @@ export class WebServerPlugin implements TestRunnerPlugin {
|
||||||
} else {
|
} else {
|
||||||
await Promise.race([
|
await Promise.race([
|
||||||
processExit,
|
processExit,
|
||||||
timers.setTimeout(timeout).then(() => {
|
timers.setTimeout(timeout, undefined, { ref: false }).then(() => {
|
||||||
// @ts-expect-error. SIGINT didn't kill the process, but `processLauncher` will only attempt killing it if this is false
|
// @ts-expect-error. SIGINT didn't kill the process, but `processLauncher` will only attempt killing it if this is false
|
||||||
launchedProcess.killed = false;
|
launchedProcess.killed = false;
|
||||||
return Promise.reject(new Error(`process didn't close gracefully within timeout, falling back to SIGKILL`));
|
throw new Error(`process didn't close gracefully within timeout, falling back to SIGKILL`);
|
||||||
}),
|
}),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue