test: give federation integration suites a realistic per-test timeout (#7)
The three test/ files boot real federated instances and drive S2S over HTTP, with several tests deliberately waiting on log matchers (e.g. logMatched(..., 1_000) per remote). Vitest's 5s default per-test timeout is meant for unit tests and is too tight here: under CI load the multi-remote fan-out tests in federation-identity-deletion intermittently timed out (observed on the post-merge main run), producing a flaky red check. Set a file-level testTimeout of 30s in each of the three harness-based suites via vi.setConfig. Scoped per-file so unit tests keep the strict 5s default; a genuine hang still trips the 30s ceiling well before the 90s hook budget. No test logic changed.
This commit is contained in:
@@ -1,9 +1,17 @@
|
||||
import { describe, it, expect, beforeAll, afterAll } from 'vitest';
|
||||
import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest';
|
||||
import { bootTwoInstances, bootHomePlusRemotes, type TwoInstanceHarness, type MultiRemoteHarness, type SpawnedInstance } from './helpers/twoInstanceHarness.js';
|
||||
import { peerInstances } from './helpers/seedPeer.js';
|
||||
import type { TestUser } from './helpers/testUsers.js';
|
||||
import { connectWs } from './helpers/wsListener.js';
|
||||
|
||||
// Every test here boots real federated instances and drives S2S over HTTP, and
|
||||
// several deliberately wait on log matchers (e.g. logMatched(..., 1_000) per
|
||||
// remote). The 5s default per-test timeout is meant for unit tests and is too
|
||||
// tight for this — under CI load the multi-remote fan-out tests intermittently
|
||||
// timed out. Give the whole file a realistic ceiling; a genuine hang still trips
|
||||
// it well before then. Hooks keep their own explicit timeouts (beforeAll 90s).
|
||||
vi.setConfig({ testTimeout: 30_000 });
|
||||
|
||||
let harness: TwoInstanceHarness;
|
||||
let sharedHmacSecret: string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user