Skip to content

test: prefer in-memory databases in sqlite tests#64701

Open
bitpshr wants to merge 1 commit into
nodejs:mainfrom
bitpshr:test/sqlite-prefer-in-memory
Open

test: prefer in-memory databases in sqlite tests#64701
bitpshr wants to merge 1 commit into
nodejs:mainfrom
bitpshr:test/sqlite-prefer-in-memory

Conversation

@bitpshr

@bitpshr bitpshr commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Refs #64665. Converts the SQLite tests that only exercise SQL behavior (transactions, data types, typed-array/data-view binding) from temporary file databases to :memory:, which is faster and drops the nextDb() temp-file bookkeeping.

Tests that verify on-disk behavior (timeout, database-sync) intentionally keep using files. This is a focused first pass; the mixed-usage files (named-parameters, statement-sync) could follow.

Refs: #64665

cc @araujogui, let me know if this is what you had in mind, happy to extend it to the remaining files.

Several SQLite tests created temporary file databases through a
`nextDb()` helper even though they only exercise SQL behavior and never
rely on filesystem persistence. Switch those to `:memory:`, which is
faster and drops the temporary-file bookkeeping. Tests that verify
on-disk behavior, such as the timeout and database-sync suites, keep
using files.

Refs: nodejs#64665
Signed-off-by: Paul Bouchon <mail@bitpshr.net>
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/sqlite

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. test Issues and PRs related to the tests. labels Jul 23, 2026
@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.13%. Comparing base (f9715fc) to head (5fe0b0f).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64701      +/-   ##
==========================================
- Coverage   90.14%   90.13%   -0.02%     
==========================================
  Files         741      741              
  Lines      242194   242246      +52     
  Branches    45606    45621      +15     
==========================================
+ Hits       218323   218345      +22     
- Misses      15358    15382      +24     
- Partials     8513     8519       +6     

see 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-ci PRs that need a full CI run. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants