mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 06:39:09 +03:00
test(studio): raise timeout for NewScopedTokenSheet tests (#51755)
## Summary
- The `NewScopedTokenSheet` tests were flaky on master. The 5s default
timeout was hit intermittently, most visibly in the "falls back to
Custom when a row diverges from the preset" test, plus some sibling
tests.
- Observed in unit-test runs on master. Reproduced locally by running
the file under heavy CPU load, where tests took 4.5-5s versus ~1s on an
idle machine.
- Fix: file-level `vi.setConfig({ testTimeout: 15_000 })`. This only
affects this file because vitest isolates test files.
## Testing
- Ran the file 5 times under the same CPU load. All 21 tests passed each
time.
This commit is contained in:
1 parent
cba8bc0b30
commit
cfdc81e1fe
1 file changed
+4
+4
@@ -25,6 +25,10 @@ vi.mock('common', async (importOriginal) => {
|
||||
const { mockTrack } = vi.hoisted(() => ({ mockTrack: vi.fn() }))
|
||||
vi.mock('@/lib/telemetry/track', () => ({ useTrack: () => mockTrack }))
|
||||
|
||||
// Each test mounts the full sheet and walks several async steps. That takes ~1s on an idle
|
||||
// machine but approaches the default 5s limit when CI workers are saturated.
|
||||
vi.setConfig({ testTimeout: 15_000 })
|
||||
|
||||
const user = userEvent.setup({
|
||||
writeToClipboard: true,
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user