Skip to content

Commit

Permalink
ci: ignore all Windows process kill errors
Browse files Browse the repository at this point in the history
When using ramdisk we now get different errors some times

```
ERROR: The process with PID 3804 (child process of PID 7516) could not be terminated.
Reason: The operation attempted is not supported.
```
  • Loading branch information
alan-agius4 committed Jun 9, 2022
1 parent e5426b9 commit a0aeb58
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions tests/legacy-cli/e2e/utils/process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,16 +205,13 @@ export async function killAllProcesses(signal = 'SIGTERM'): Promise<void> {
}

processesToKill.push(
new Promise<void>((resolve, reject) => {
treeKill(childProc.pid, signal, (err) => {
if (err && !err.message.includes('not found')) {
// Ignore process not found errors.
// This is due to a race condition with the `waitForMatch` logic.
// where promises are resolved on matches and not when the process terminates.
reject(err);
} else {
resolve();
}
new Promise<void>((resolve) => {
treeKill(childProc.pid, signal, () => {
// Ignore all errors.
// This is due to a race condition with the `waitForMatch` logic.
// where promises are resolved on matches and not when the process terminates.
// Also in some cases in windows we get `The operation attempted is not supported`.
resolve();
});
}),
);
Expand Down

0 comments on commit a0aeb58

Please sign in to comment.