From 5c671e53ae571d264e12d42aa8a8d6ee98946d8f Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 9 Jun 2026 09:47:59 +0000 Subject: [PATCH] test: add 15s timeout to analyze dependency-risks settings-404 test on Windows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The test 'exits with code 1 when project does not exist (settings 404)' was missing an explicit timeout option and relied on Bun's default 5000ms. On the Windows CI runner it took 5049ms — just 50ms over the limit — causing a spurious failure. Adjacent tests already use { timeout: 15000 }; applying the same value here makes the suite consistent and prevents the flap. Fixes: Build run 27197141869 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .../analyze/analyze-dependency-risks.test.ts | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/tests/integration/specs/analyze/analyze-dependency-risks.test.ts b/tests/integration/specs/analyze/analyze-dependency-risks.test.ts index 6b4f54186..de48a6479 100644 --- a/tests/integration/specs/analyze/analyze-dependency-risks.test.ts +++ b/tests/integration/specs/analyze/analyze-dependency-risks.test.ts @@ -58,20 +58,24 @@ describe('analyze dependency-risks', () => { { timeout: 15000 }, ); - it('exits with code 1 when project does not exist (settings 404)', async () => { - const server = await harness - .newFakeServer() - .withAuthToken(VALID_TOKEN) - .withScaEnabled(true) - .start(); - harness.withAuth(server.baseUrl(), VALID_TOKEN, TEST_ORG); + it( + 'exits with code 1 when project does not exist (settings 404)', + async () => { + const server = await harness + .newFakeServer() + .withAuthToken(VALID_TOKEN) + .withScaEnabled(true) + .start(); + harness.withAuth(server.baseUrl(), VALID_TOKEN, TEST_ORG); - const result = await harness.run('analyze dependency-risks --project demo'); + const result = await harness.run('analyze dependency-risks --project demo'); - expect(result.exitCode).toBe(1); - expect(result.stdout + result.stderr).toContain('Project demo not found'); - expect(server.getRecordedRequests().some((r) => r.path === '/api/settings/values')).toBe(true); - }); + expect(result.exitCode).toBe(1); + expect(result.stdout + result.stderr).toContain('Project demo not found'); + expect(server.getRecordedRequests().some((r) => r.path === '/api/settings/values')).toBe(true); + }, + { timeout: 15000 }, + ); it( 'exits with code 1 when SCA is disabled on the server',