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 <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
  • Loading branch information
Trott committed Jan 25, 2021
1 parent 21c8c7e commit 13ac5fb
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 13ac5fb

Please sign in to comment.