test(fleet): raise mosaic vitest timeout package-wide
This commit is contained in:
@@ -2,17 +2,24 @@
|
|||||||
|
|
||||||
## Objective
|
## Objective
|
||||||
|
|
||||||
Raise `packages/mosaic/src/commands/fleet-personas.spec.ts` Vitest timeout to 30s, mirroring PR #665's `fleet-provision.spec.ts` CI flake fix.
|
Raise the `@mosaicstack/mosaic` Vitest timeout to 30s at config level so filesystem-backed fleet drift-guard specs (`fleet-personas`, `fleet-profiles`, and siblings) stop false-reding under contended CI.
|
||||||
|
|
||||||
## Plan
|
## Plan
|
||||||
|
|
||||||
1. Copy `vi.setConfig({ testTimeout: 30_000 })` pattern/placement from `fleet-provision.spec.ts`.
|
1. Move timeout policy into `packages/mosaic/vitest.config.ts` with `testTimeout: 30_000`.
|
||||||
2. Run targeted test plus typecheck/lint/format gates.
|
2. Remove the narrower `fleet-personas.spec.ts` local override so PR #677 fixes the suite class, not one file.
|
||||||
3. Commit, queue guard, push, PR.
|
3. Run targeted fleet specs plus typecheck/lint/format gates.
|
||||||
|
4. Commit, queue guard, push, PR update.
|
||||||
|
|
||||||
## Evidence
|
## Evidence
|
||||||
|
|
||||||
- `pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet-personas.spec.ts` — pass (8 tests).
|
- `pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet-personas.spec.ts` — pass (8 tests; initial narrow fix).
|
||||||
- `pnpm typecheck` — pass (41 tasks).
|
- `pnpm typecheck` — pass (41 tasks; initial narrow fix).
|
||||||
- `pnpm lint` — pass (23 tasks).
|
- `pnpm lint` — pass (23 tasks; initial narrow fix).
|
||||||
- `pnpm format:check` — pass after formatting this scratchpad.
|
- `pnpm format:check` — pass after formatting this scratchpad (initial narrow fix).
|
||||||
|
- Package-wide timeout follow-up:
|
||||||
|
- `pnpm --filter @mosaicstack/mosaic test -- src/commands/fleet-personas.spec.ts src/commands/fleet-profiles.spec.ts` — pass (24 tests).
|
||||||
|
- `pnpm --filter @mosaicstack/mosaic test` — pass (44 files / 618 tests).
|
||||||
|
- `pnpm typecheck` — pass (41 tasks).
|
||||||
|
- `pnpm lint` — pass (23 tasks).
|
||||||
|
- `pnpm format:check` — pass.
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export default tseslint.config(
|
|||||||
'apps/gateway/vitest.config.ts',
|
'apps/gateway/vitest.config.ts',
|
||||||
'packages/db/vitest.config.ts',
|
'packages/db/vitest.config.ts',
|
||||||
'packages/storage/vitest.config.ts',
|
'packages/storage/vitest.config.ts',
|
||||||
|
'packages/mosaic/vitest.config.ts',
|
||||||
'packages/mosaic/__tests__/*.ts',
|
'packages/mosaic/__tests__/*.ts',
|
||||||
'tools/federation-harness/*.ts',
|
'tools/federation-harness/*.ts',
|
||||||
],
|
],
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import { cp, mkdir, mkdtemp, rm, writeFile } from 'node:fs/promises';
|
|||||||
import { tmpdir } from 'node:os';
|
import { tmpdir } from 'node:os';
|
||||||
import { dirname, join, resolve } from 'node:path';
|
import { dirname, join, resolve } from 'node:path';
|
||||||
import { fileURLToPath } from 'node:url';
|
import { fileURLToPath } from 'node:url';
|
||||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
|
import { afterEach, beforeEach, describe, expect, it } from 'vitest';
|
||||||
import {
|
import {
|
||||||
extractClassesFromDir,
|
extractClassesFromDir,
|
||||||
listPersonaClasses,
|
listPersonaClasses,
|
||||||
@@ -11,11 +11,6 @@ import {
|
|||||||
} from './fleet-personas.js';
|
} from './fleet-personas.js';
|
||||||
import { loadProfiles, validateProfile, type FleetProfile } from './fleet-profiles.js';
|
import { loadProfiles, validateProfile, type FleetProfile } from './fleet-profiles.js';
|
||||||
|
|
||||||
// These are INTEGRATION tests: they exercise real filesystem I/O while scanning
|
|
||||||
// and validating the committed + override persona libraries. Under contended CI
|
|
||||||
// runners, the default 5s timeout can false-red even though the suite is healthy.
|
|
||||||
vi.setConfig({ testTimeout: 30_000 });
|
|
||||||
|
|
||||||
// The real, committed library: packages/mosaic/src/commands -> framework/fleet.
|
// The real, committed library: packages/mosaic/src/commands -> framework/fleet.
|
||||||
const frameworkFleet = resolve(
|
const frameworkFleet = resolve(
|
||||||
dirname(fileURLToPath(import.meta.url)),
|
dirname(fileURLToPath(import.meta.url)),
|
||||||
|
|||||||
@@ -4,5 +4,6 @@ export default defineConfig({
|
|||||||
test: {
|
test: {
|
||||||
globals: true,
|
globals: true,
|
||||||
environment: 'node',
|
environment: 'node',
|
||||||
|
testTimeout: 30_000,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user