From dec2c57e557a709bd3516bb53313c23ef630ce06 Mon Sep 17 00:00:00 2001 From: Tomi Turtiainen <10324676+tomi@users.noreply.github.com> Date: Fri, 18 Oct 2024 10:45:27 +0300 Subject: [PATCH] test: Fix flaky task-runner integration test --- .../test/integration/runners/task-runner-process.test.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/cli/test/integration/runners/task-runner-process.test.ts b/packages/cli/test/integration/runners/task-runner-process.test.ts index e623d5f37116a..f97379db28ae8 100644 --- a/packages/cli/test/integration/runners/task-runner-process.test.ts +++ b/packages/cli/test/integration/runners/task-runner-process.test.ts @@ -89,14 +89,14 @@ describe('TaskRunnerProcess', () => { runnerProcess.process?.kill('SIGKILL'); // Assert - // Wait until the runner is running again - await retryUntil(() => expect(runnerProcess.isRunning).toBeTruthy()); - expect(runnerProcess.pid).not.toBe(processId); + // Wait until the runner has died + await retryUntil(() => expect(runnerProcess.pid).not.toBe(processId)); // Wait until the runner has connected again await retryUntil(() => expect(getNumConnectedRunners()).toBe(1)); expect(getNumConnectedRunners()).toBe(1); expect(getNumRegisteredRunners()).toBe(1); + expect(runnerProcess.pid).not.toBe(processId); }); it('should launch runner directly if not using a launcher', async () => {