test: prefer in-memory databases in sqlite tests · nodejs/node@74a3e91 · GitHub
Skip to content

Commit 74a3e91

Browse files
bitpshraduh95
authored andcommitted
test: prefer in-memory databases in sqlite tests
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 depend on an on-disk or shared database keep using files: the constructor, open() and backup() cases, the timeout and cross-worker suites, and the WAL journal-mode PRAGMA. Refs: #64665 Signed-off-by: Paul Bouchon <mail@bitpshr.net> PR-URL: #64701 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 5cac7c2 commit 74a3e91

6 files changed

Lines changed: 54 additions & 98 deletions

test/parallel/test-sqlite-data-types.js

Lines changed: 5 additions & 14 deletions

test/parallel/test-sqlite-named-parameters.js

Lines changed: 4 additions & 13 deletions

0 commit comments

Comments
 (0)