Repository navigation
test(cc-switch): finalize the F1/F2 fixture statements before cleanup - #8002
Conversation
Like F3 (#7986), F1/F2 inserted with unfinalized prepare().run() statements, which keep the SQLite file open past close() on Windows and make the temp-tree cleanup fail with EBUSY. Use db.run(sql, ...params).
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 7 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
✅ Deterministic PR hygiene checks passed. |
|
Maintainer integration (lane L1, cross-platform CI). Squash-merging into dev under the maintainer-integration exception in MAINTAINERS.md. This records the decision; it is not a self-approval. Exact head: |
Summary
Completes the fix #7986 started for
tests/providers/cc-switch-import.test.tson Windows. #7986 released the F3 WAL writer's statements. The F1/F2 case (word-shaped canary…) builds its fixture database withdb.prepare(...).run(...)the same way, twice, and never finalizes those statements. On Windows the unfinalized statements keep the SQLite file open afterdb.close(). The test's cleanup (removeTreeWithRetry, line 104) then retries for 15 s and fails withEBUSY. That happened in a local run of Windows shard 2/11 atac0833bc5, a head that already includes the F3 fix. Whether a run hits it depends on when garbage collection finalizes the statements.F1/F2 now inserts with
db.run(sql, ...params), which finalizes each statement, and its assertions are unchanged. The shared seeder at line 67 already callsfinalize()and is the only remainingprepare()in the file.Verification
prepare(...).run(...), thenclose()and remove the directory:EBUSYboth times. The same steps withdb.run(sql, value)remove the directory both times.bun test tests/providers/cc-switch-import.test.tson Windows: 9 pass / 0 fail.lane=alldispatch on dev.Checklist