Skip to content

Commit 1dc50f9

Browse files
inoway46aduh95
authored andcommitted
test: relax test-memory-usage arrayBuffers check
Signed-off-by: inoway46 <inoueyuya416@gmail.com> PR-URL: #63244 Reviewed-By: Richard Lau <richard.lau@ibm.com> Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
1 parent a05b47f commit 1dc50f9

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

test/parallel/test-memory-usage.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ if (r.arrayBuffers > 0) {
4444
const after = process.memoryUsage();
4545
assert.ok(after.external - r.external >= size,
4646
`${after.external} - ${r.external} >= ${size}`);
47-
assert.strictEqual(after.arrayBuffers - r.arrayBuffers, size,
48-
`${after.arrayBuffers} - ${r.arrayBuffers} === ${size}`);
47+
// `arrayBuffers` is process-wide, so unrelated backing stores may be freed
48+
// between the two snapshots. Check that the live ArrayBuffer is included.
49+
assert.ok(after.arrayBuffers >= size,
50+
`${after.arrayBuffers} >= ${size}`);
4951
}

0 commit comments

Comments
 (0)