Skip to content

Commit 45056a4

Browse files
committed
fix(test): extend watchdog for gateway core shard
1 parent c773d8c commit 45056a4

3 files changed

Lines changed: 20 additions & 1 deletion

File tree

scripts/run-vitest.mjs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const UI_VITEST_CONFIG = "test/vitest/vitest.ui.config.ts";
3333
const UNIT_UI_VITEST_CONFIG = "test/vitest/vitest.unit-ui.config.ts";
3434
const TOOLING_DOCKER_VITEST_CONFIG = "test/vitest/vitest.tooling-docker.config.ts";
3535
const TOOLING_VITEST_CONFIG = "test/vitest/vitest.tooling.config.ts";
36+
const GATEWAY_CORE_VITEST_CONFIG = "test/vitest/vitest.gateway-core.config.ts";
3637
const GATEWAY_VITEST_CONFIG = "test/vitest/vitest.gateway.config.ts";
3738
const VITEST_CONFIG_NO_OUTPUT_TIMEOUT_MS = new Map([
3839
["test/vitest/vitest.e2e.config.ts", DEFAULT_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS],
@@ -48,6 +49,7 @@ const VITEST_CONFIG_NO_OUTPUT_TIMEOUT_MS = new Map([
4849
DEFAULT_EXTRA_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS,
4950
],
5051
["test/vitest/vitest.infra.config.ts", DEFAULT_EXTRA_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS],
52+
[GATEWAY_CORE_VITEST_CONFIG, DEFAULT_EXTRA_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS],
5153
]);
5254
const TOOLING_EXCLUDED_TESTS = new Set([
5355
...boundaryTestFiles,

test/scripts/run-vitest.test.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -492,6 +492,7 @@ describe("scripts/run-vitest", () => {
492492
for (const configArg of [
493493
"--config=test/vitest/vitest.contracts-plugin.config.ts",
494494
"--config=test/vitest/vitest.infra.config.ts",
495+
"--config=test/vitest/vitest.gateway-core.config.ts",
495496
]) {
496497
expect(resolveRunVitestSpawnEnv({ PATH: "/usr/bin" }, ["run", configArg])).toEqual({
497498
PATH: "/usr/bin",
@@ -541,6 +542,13 @@ describe("scripts/run-vitest", () => {
541542
"/repo/test/vitest/vitest.infra.config.ts",
542543
]),
543544
).toBe(DEFAULT_EXTRA_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS);
545+
expect(
546+
resolveDefaultVitestNoOutputTimeoutMs([
547+
"run",
548+
"--config",
549+
"/repo/test/vitest/vitest.gateway-core.config.ts",
550+
]),
551+
).toBe(DEFAULT_EXTRA_LONG_RUNNING_VITEST_NO_OUTPUT_TIMEOUT_MS);
544552
});
545553

546554
it("does not default implicit interactive runs to the stall watchdog", () => {

test/scripts/test-projects.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2735,6 +2735,14 @@ describe("scripts/test-projects Vitest stall watchdog", () => {
27352735
pnpmArgs: [],
27362736
watchMode: false,
27372737
},
2738+
{
2739+
config: "test/vitest/vitest.gateway-core.config.ts",
2740+
env: { PATH: "/usr/bin" },
2741+
includeFilePath: null,
2742+
includePatterns: null,
2743+
pnpmArgs: [],
2744+
watchMode: false,
2745+
},
27382746
{
27392747
config: "test/vitest/vitest.extension-feishu.config.ts",
27402748
env: { PATH: "/usr/bin" },
@@ -2749,7 +2757,8 @@ describe("scripts/test-projects Vitest stall watchdog", () => {
27492757

27502758
expect(specs[0]?.env.OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS).toBe("2400000");
27512759
expect(specs[1]?.env.OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS).toBe("2400000");
2752-
expect(specs[2]?.env.OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS).toBe(
2760+
expect(specs[2]?.env.OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS).toBe("2400000");
2761+
expect(specs[3]?.env.OPENCLAW_VITEST_NO_OUTPUT_TIMEOUT_MS).toBe(
27532762
DEFAULT_TEST_PROJECTS_VITEST_NO_OUTPUT_TIMEOUT_MS,
27542763
);
27552764
});

0 commit comments

Comments
 (0)