Skip to content

Commit 06deb94

Browse files
committed
test: fix flaky test-memory-usage
abe6a2e introduced a test that verifies that ArrayBuffer allocations are tracked. However, V8 supports concurrent freeing of such allocations on background threads, meaning that the results may be subject to race conditions sometimes. Disabling concurrent freeing makes the test pass consistently. Refs: #31550 PR-URL: #31602 Reviewed-By: Gireesh Punathil <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 938abd9 commit 06deb94

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

test/parallel/test-memory-usage.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

22+
// Flags: --no-concurrent-array-buffer-freeing
2223
'use strict';
2324
const common = require('../common');
2425
const assert = require('assert');
@@ -41,5 +42,5 @@ if (r.arrayBuffers > 0) {
4142
assert(after.external - r.external >= size,
4243
`${after.external} - ${r.external} >= ${size}`);
4344
assert.strictEqual(after.arrayBuffers - r.arrayBuffers, size,
44-
`${after.arrayBuffers} - ${r.arrayBuffers} >= ${size}`);
45+
`${after.arrayBuffers} - ${r.arrayBuffers} === ${size}`);
4546
}

0 commit comments

Comments
 (0)