mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
Fix flaky test
This commit is contained in:
5
test/cli/run/esm-fixture-leak-small.mjs
generated
5
test/cli/run/esm-fixture-leak-small.mjs
generated
@@ -20,8 +20,9 @@ setTimeout(() => {
|
||||
let diff = process.memoryUsage.rss() - baseline;
|
||||
diff = (diff / 1024 / 1024) | 0;
|
||||
console.log({ leaked: diff + " MB" });
|
||||
// this one might be too flaky
|
||||
if (diff > 40) {
|
||||
// This used to be 40 MB, but the original version of Bun which this triggered on would reach 120 MB
|
||||
// so we can increase it to 60 and still catch the leak.
|
||||
if (diff > 60) {
|
||||
console.log("\n--fail--\n");
|
||||
process.exit(1);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user