mirror of
https://github.com/oven-sh/bun
synced 2026-02-18 23:01:58 +00:00
Replace all fixed Bun.sleep() calls with condition-based polling using a waitForProcessDeath() helper. This: 1. Follows test guidelines: "wait for conditions instead of arbitrary time" 2. Makes tests faster (processes detected as dead immediately) 3. Makes tests more reliable on slow machines or under load 4. Avoids flaky test failures The helper polls with 10ms intervals and a 1s timeout, checking if the process has exited rather than sleeping for a fixed duration. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>