Fix flaky test

This commit is contained in:
Jarred Sumner
2023-12-18 01:11:36 -08:00
parent 506c165860
commit 7ac5bdc9dd

View File

@@ -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 {