## Problem Browser tests occasionally fail in CI with: ``` Error: Browser connection was closed while running tests. Was the page closed unexpectedly? ``` ## Observed behavior - `concurrency.test.ts` passes - `durably.test.ts` fails with WebSocket connection closed - Happens intermittently (flaky) ## Possible causes 1. OPFS resource contention between parallel test files 2. SQLocal cleanup not completing before next test starts 3. Memory pressure in CI environment 4. Test file execution order issues ## Investigation needed - Review `tests/helpers/browser-dialect.ts` OPFS usage - Check cleanup patterns in `afterEach` hooks - Consider `fileParallelism: false` as workaround (but impacts speed) - Look into SQLocal's known issues with concurrent access ## References - Observed in PR #15 CI runs
Problem
Browser tests occasionally fail in CI with:
Observed behavior
concurrency.test.tspassesdurably.test.tsfails with WebSocket connection closedPossible causes
Investigation needed
tests/helpers/browser-dialect.tsOPFS usageafterEachhooksfileParallelism: falseas workaround (but impacts speed)References