Skip to content

Commit

Permalink
test: improve assertion message for test-vm-memleak
Browse files Browse the repository at this point in the history
The test is unreliable in CI. It might be helpful to get an exact read
of `rss` so this adds that to the assertion message.

PR-URL: #37034
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
  • Loading branch information
Trott authored and targos committed May 1, 2021
1 parent 49f1374 commit ec7ee61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/pummel/test-vm-memleak.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const interval = setInterval(function() {

const rss = process.memoryUsage().rss;
assert.ok(rss < 64 * 1024 * 1024,
`memory usage: ${Math.round(rss / (1024 * 1024))}Mb`);
`memory usage: ${rss} (${Math.round(rss / (1024 * 1024))} MB)`);

// Stop after 5 seconds.
if (Date.now() - start > 5 * 1000) {
Expand Down

0 comments on commit ec7ee61

Please sign in to comment.