Skip to content

Commit f2039eb

Browse files
committed
test: use --expose-gc
1 parent 37f0477 commit f2039eb

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/parallel/test-sqlite-template-tag.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
'use strict';
2+
// Flags: --expose-gc
3+
24
require('../common');
35
const assert = require('assert');
46
const { DatabaseSync } = require('node:sqlite');
@@ -106,11 +108,8 @@ test('regression test https://github.com/nodejs/node/issues/60448', () => {
106108

107109
sql.db.exec('CREATE TABLE test (data INTEGER)');
108110

109-
// Simulating meaningful work/likely triggering garbage collection...
110-
for (const x of new Array(100_000).fill(0)) {
111-
// eslint-disable-next-line no-unused-expressions
112-
x + x;
113-
}
111+
global.gc();
112+
114113
// eslint-disable-next-line no-unused-expressions
115114
sql.run`INSERT INTO test (data) VALUES (1)`;
116115
});

0 commit comments

Comments
 (0)