From 406e40584dd110dc00fdc9b68f8b0d6e9b1d53f4 Mon Sep 17 00:00:00 2001 From: "shaggy (mosaic-dev box)" Date: Mon, 10 Aug 2026 01:34:24 -0500 Subject: [PATCH] test(gateway): raise module-graph import timeout for CI load robustness (#1138) --- apps/gateway/src/app.module.spec.ts | 3 ++- apps/gateway/src/main.spec.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/gateway/src/app.module.spec.ts b/apps/gateway/src/app.module.spec.ts index 87472b90..66a2d237 100644 --- a/apps/gateway/src/app.module.spec.ts +++ b/apps/gateway/src/app.module.spec.ts @@ -42,7 +42,8 @@ interface ModuleGraphFixtureOptions { setup?: (fixture: ModuleGraphFixture) => Promise; } -const MODULE_IMPORT_TIMEOUT_MS = 30_000; +// Each case uses vi.resetModules() and re-imports the full gateway graph for distinct ambient FS/env; CI needs headroom, while this still guards genuine hangs. +const MODULE_IMPORT_TIMEOUT_MS = 120_000; const MONOREPO_ROOT_DOTENV_LABEL = 'monorepo-root .env'; const DAEMON_DOTENV_LABEL = 'daemon .env'; diff --git a/apps/gateway/src/main.spec.ts b/apps/gateway/src/main.spec.ts index b482f193..10999917 100644 --- a/apps/gateway/src/main.spec.ts +++ b/apps/gateway/src/main.spec.ts @@ -7,7 +7,8 @@ import type { MosaicConfig } from '@mosaicstack/config'; import type * as MosaicStorage from '@mosaicstack/storage'; import { describe, expect, it, vi, type MockInstance } from 'vitest'; -const MODULE_IMPORT_TIMEOUT_MS = 30_000; +// Each case uses vi.resetModules() and re-imports the full gateway graph for distinct ambient FS/env; CI needs headroom, while this still guards genuine hangs. +const MODULE_IMPORT_TIMEOUT_MS = 120_000; function snapshotProcessEnv(): Record { return { ...process.env };