From 284c7974995cfd9ea7212568f00c3ea753bed444 Mon Sep 17 00:00:00 2001 From: chinmay-browserstack <92926953+chinmay-browserstack@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:17:28 +0530 Subject: [PATCH] Fix flaky cli exec tests (#1497) --- packages/cli-exec/test/exec.test.js | 2 +- packages/cli-exec/test/start.test.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/cli-exec/test/exec.test.js b/packages/cli-exec/test/exec.test.js index e73cfa3ff..45d8d87e4 100644 --- a/packages/cli-exec/test/exec.test.js +++ b/packages/cli-exec/test/exec.test.js @@ -289,7 +289,7 @@ describe('percy exec', () => { )]); // wait until the process starts - await new Promise(r => setTimeout(r, 500)); + await new Promise(r => setTimeout(r, 1000)); expect(logger.stdout).toEqual(jasmine.arrayContaining([ jasmine.stringContaining('[percy] Running "node --eval ') ])); diff --git a/packages/cli-exec/test/start.test.js b/packages/cli-exec/test/start.test.js index a9fe28d48..21a71f53e 100644 --- a/packages/cli-exec/test/start.test.js +++ b/packages/cli-exec/test/start.test.js @@ -18,6 +18,8 @@ describe('percy exec:start', () => { started = start(['--quiet']); started.then(() => (started = null)); + // wait until the process starts + await new Promise(r => setTimeout(r, 1000)); await ping(); });