This commit is contained in:
Jarred Sumner
2024-03-14 08:01:53 +01:00
parent 85c4e87ccc
commit 71368b60fa
2 changed files with 3 additions and 1 deletions

View File

@@ -4,4 +4,4 @@ if (!process.env.BUN_GARBAGE_COLLECTOR_LEVEL || !process.env.BUN_FEATURE_FLAG_FO
throw new Error("This test must be run with BUN_GARBAGE_COLLECTOR_LEVEL and BUN_FEATURE_FLAG_FORCE_WAITER_THREAD");
}
spawn("sleep", ["infinity"]).ref();
spawn("sleep", ["infinity"]);

View File

@@ -22,6 +22,8 @@ if (process.platform === "linux") {
await proc.exited;
const resourceUsage = proc.resourceUsage();
// Assert we didn't use 100% of CPU time
expect(resourceUsage?.cpuTime.total).toBeLessThan(750_000n);
});
}