Skip to content

Commit a9fefd2

Browse files
committed
test: add gc exposure flag to sqlite backup test
1 parent 2bb6e14 commit a9fefd2

2 files changed

Lines changed: 33 additions & 4 deletions

File tree

β€ŽAGENTS.mdβ€Ž

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# AGENTS.md
2+
3+
Non-discoverable rules for the Node.js codebase.
4+
5+
## Landmines
6+
7+
- `make test-only` must run from the working directory where local changes are applied, not a separate clone.
8+
- `make lint` is comprehensive: JS, C++, Markdown, YAML, doc, addon-doc, and shell scripts.
9+
- CI lint (`lint-ci`) adds Python linting, which requires `make lint-py-build` first.
10+
11+
## Commands
12+
13+
- `make lint` β€” full local lint check
14+
- `make lint-js-fix` β€” auto-fix JS lint errors
15+
- `make test-only` β€” run tests only (no rebuild)
16+
- `make -j4 test` β€” full check including documentation tests
17+
18+
## Rules
19+
20+
- PRs go to upstream `main`.
21+
- Commit messages use Node.js format: `subsystem: description`
22+
23+
## Discoverable in code/config
24+
25+
- `BUILDING.md` β€” prerequisites and build instructions
26+
- `CONTRIBUTING.md` β€” contribution workflow
27+
- `doc/contributing/pull-requests.md` β€” PR process
28+
- `GOVERNANCE.md` β€” project governance
29+
- `Makefile` β€” all build/test/lint targets

β€Žtest/parallel/test-sqlite-backup.mjsβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -341,10 +341,10 @@ test('source database is kept alive while a backup is in flight', async (t) => {
341341
// Nudge the GC aggressively, but the backup must keep the source alive
342342
// regardless. Without the fix, the source DatabaseSync would be collected
343343
// and BackupJob::Finalize() would crash the process.
344-
for (let i = 0; i < 5; i++) {
345-
global.gc();
346-
await new Promise((resolve) => setImmediate(resolve));
347-
}
344+
for (let i = 0; i < 5; i++) {
345+
global.gc();
346+
await new Promise((resolve) => setImmediate(resolve));
347+
}
348348

349349
const totalPages = await p;
350350
t.assert.ok(totalPages > 0);

0 commit comments

Comments
Β (0)