Skip to content

Commit d96c340

Browse files
committed
Budget the two structurally slow tests explicitly
sso-trust imports the whole Better Auth module graph (2.5s on an idle machine) and events.attribution scans call sites across the repo. Under a fully-parallel uncached run on a loaded machine both blow the default timeout while passing in isolation and on CI — a verdict decided by machine load, not by the code. 30s budgets make a loaded local run mean what it says.
1 parent 3f32259 commit d96c340

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

‎apps/sim/lib/auth/sso-trust.test.ts‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,11 @@
1010
import { resetEnvFlagsMock, setEnvFlags } from '@sim/testing'
1111
import { afterAll, expect, it, vi } from 'vitest'
1212

13+
// Structurally slow — it imports the entire Better Auth module graph — so under a fully-parallel local run this file
14+
// blows the default timeout while passing in isolation and on CI. Give it a
15+
// real budget instead of letting machine load decide the verdict.
16+
vi.setConfig({ testTimeout: 30_000 })
17+
1318
const { ssoOptions } = vi.hoisted(() => ({
1419
ssoOptions: { current: undefined as Record<string, unknown> | undefined },
1520
}))

‎apps/sim/lib/table/events.attribution.test.ts‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
*/
44
import { readdir, readFile } from 'node:fs/promises'
55
import { join } from 'node:path'
6-
import { describe, expect, it } from 'vitest'
6+
import { describe, expect, it, vi } from 'vitest'
7+
8+
// Structurally slow — it scans call sites across the repo — so under a fully-parallel local run this file
9+
// blows the default timeout while passing in isolation and on CI. Give it a
10+
// real budget instead of letting machine load decide the verdict.
11+
vi.setConfig({ testTimeout: 30_000 })
712

813
/**
914
* `signalTableRowsChangedByActor` lets the acting tab skip its own refetch, which is only sound

0 commit comments

Comments
 (0)