mirror of
https://github.com/oven-sh/bun
synced 2026-02-15 05:12:29 +00:00
Fixup
This commit is contained in:
2
test/js/bun/spawn/spawn_waiter_thread-fixture.js
generated
2
test/js/bun/spawn/spawn_waiter_thread-fixture.js
generated
@@ -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"]);
|
||||
|
||||
@@ -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);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user