Skip to content

Commit

Permalink
Update fetch-tcp-stress.test.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jarred-Sumner committed Sep 27, 2024
1 parent 856c64f commit 378631f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/js/web/fetch/fetch-tcp-stress.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,14 @@ async function runStressTest({

await Bun.sleep(80);

for (let i = 0; i < 10; i++) {
let max = getMaxFD();
if (max > initialMaxFD + 10) {
await Bun.sleep(10);
console.log("Max FD is still high!", { max, initialMaxFD });
}
}

expect(getMaxFD()).toBeLessThan(initialMaxFD + 10);
}

Expand Down

0 comments on commit 378631f

Please sign in to comment.