test: improve assertion message for test-vm-memleak

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: https://github.com/nodejs/node/pull/37034
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
This commit is contained in:
Rich Trott committed 2021-01-25 11:25:47 -08:00
1 parent 21c8c7e511
commit 13ac5fbc57
1 file changed
+1 -1
+1 -1
View File
@@ -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) {