diff --git a/packages/server/test/federation-by-home-id.test.ts b/packages/server/test/federation-by-home-id.test.ts index a608371d..0629cd2a 100644 --- a/packages/server/test/federation-by-home-id.test.ts +++ b/packages/server/test/federation-by-home-id.test.ts @@ -1,9 +1,14 @@ -import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { describe, it, expect, beforeAll, afterAll, vi } from 'vitest'; import { bootTwoInstances, type TwoInstanceHarness } from './helpers/twoInstanceHarness.js'; import { peerInstances } from './helpers/seedPeer.js'; import { registerLocal } from './helpers/testUsers.js'; import { buildHeadersForOrigin } from './helpers/hmacSign.js'; +// Boots real federated instances and drives S2S over HTTP; the 5s unit-test +// default is too tight under CI load. See federation-identity-deletion.test.ts +// for the rationale. A genuine hang still trips this ceiling. +vi.setConfig({ testTimeout: 30_000 }); + let harness: TwoInstanceHarness; let sharedSecret: string; diff --git a/packages/server/test/federation-handshake-desync.test.ts b/packages/server/test/federation-handshake-desync.test.ts index eca3eea3..9ba4f5ca 100644 --- a/packages/server/test/federation-handshake-desync.test.ts +++ b/packages/server/test/federation-handshake-desync.test.ts @@ -1,4 +1,4 @@ -import { describe, it, expect, afterEach } from 'vitest'; +import { describe, it, expect, afterEach, vi } from 'vitest'; import { bootTwoInstancesForHandshake, registerAdmin, @@ -11,6 +11,12 @@ import { import type { TwoInstanceHarness } from './helpers/twoInstanceHarness.js'; import { openInspector } from './helpers/dbInspect.js'; +// Boots real federated instances and drives the peering handshake over HTTP; the +// 5s unit-test default is too tight under CI load. See +// federation-identity-deletion.test.ts for the rationale. A genuine hang still +// trips this ceiling. +vi.setConfig({ testTimeout: 30_000 }); + /** * Acceptance-gate integration suite for the federation handshake desync bugs. * diff --git a/packages/server/test/federation-identity-deletion.test.ts b/packages/server/test/federation-identity-deletion.test.ts index 2868ed3a..416508f2 100644 --- a/packages/server/test/federation-identity-deletion.test.ts +++ b/packages/server/test/federation-identity-deletion.test.ts @@ -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;