From 9dc1694eb78e89f91deb41f848974815efc1cbbc Mon Sep 17 00:00:00 2001 From: Vincent Koc Date: Wed, 3 Jun 2026 05:00:04 -0700 Subject: [PATCH] test: lengthen ARM contracts shard watchdog --- scripts/run-vitest.mjs | 1 + test/scripts/run-vitest.test.ts | 41 +++++++++++++++------------------ 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/scripts/run-vitest.mjs b/scripts/run-vitest.mjs index acb4affa5d4c..ef8f3956b175 100644 --- a/scripts/run-vitest.mjs +++ b/scripts/run-vitest.mjs @@ -28,6 +28,7 @@ const TOOLING_VITEST_CONFIG = "test/vitest/vitest.tooling.config.ts"; const LONG_RUNNING_VITEST_CONFIGS = new Set([ "test/vitest/vitest.e2e.config.ts", "test/vitest/vitest.ui-e2e.config.ts", + "test/vitest/vitest.full-core-contracts.config.ts", ]); const TOOLING_EXCLUDED_TESTS = new Set([ ...boundaryTestFiles, diff --git a/test/scripts/run-vitest.test.ts b/test/scripts/run-vitest.test.ts index 71ef180f4d6e..6f590d7dd848 100644 --- a/test/scripts/run-vitest.test.ts +++ b/test/scripts/run-vitest.test.ts @@ -423,30 +423,20 @@ describe("scripts/run-vitest", () => { }); }); - it("uses a longer default stall watchdog for broad e2e configs", () => { + it("uses a longer default stall watchdog for broad e2e and project shard configs", () => { const timeout = String(DEFAULT_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS); - expect( - resolveRunVitestSpawnEnv({ PATH: "/usr/bin" }, [ - "run", - "--config", - "test/vitest/vitest.e2e.config.ts", - ]), - ).toEqual({ - PATH: "/usr/bin", - OPENCLAW_VITEST_NO_OUTPUT_HEARTBEAT_MS: "60000", - OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS: timeout, - }); - expect( - resolveRunVitestSpawnEnv({ PATH: "/usr/bin" }, [ - "run", - "--config=./test/vitest/vitest.ui-e2e.config.ts", - ]), - ).toEqual({ - PATH: "/usr/bin", - OPENCLAW_VITEST_NO_OUTPUT_HEARTBEAT_MS: "60000", - OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS: timeout, - }); + for (const configArg of [ + "--config=test/vitest/vitest.e2e.config.ts", + "--config=./test/vitest/vitest.ui-e2e.config.ts", + "--config=test/vitest/vitest.full-core-contracts.config.ts", + ]) { + expect(resolveRunVitestSpawnEnv({ PATH: "/usr/bin" }, ["run", configArg])).toEqual({ + PATH: "/usr/bin", + OPENCLAW_VITEST_NO_OUTPUT_HEARTBEAT_MS: "60000", + OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS: timeout, + }); + } expect( resolveDefaultVitestNoOutputTimeoutMs([ "run", @@ -454,6 +444,13 @@ describe("scripts/run-vitest", () => { "/repo/test/vitest/vitest.e2e.config.ts", ]), ).toBe(DEFAULT_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS); + expect( + resolveDefaultVitestNoOutputTimeoutMs([ + "run", + "--config", + "/repo/test/vitest/vitest.full-core-contracts.config.ts", + ]), + ).toBe(DEFAULT_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS); }); it("does not default implicit interactive runs to the stall watchdog", () => {