test(daemon): move RPC ports out of Linux ephemeral range to fix CI flake#57
test(daemon): move RPC ports out of Linux ephemeral range to fix CI flake#57Rinse12 wants to merge 1 commit into
Conversation
…lake Ubuntu CI was flaking on the `bitsocial daemon webui` suite with `EADDRINUSE :::39138` during `beforeAll`. The hardcoded RPC ports 11138/19138/29138/39138/49138/59338/59339 all sit inside Linux's default ephemeral range (32768-60999), so an unrelated outbound socket on the runner could grab the port before the daemon bound it. Move them to a clean 9148-9208 block, below every platform's ephemeral floor (Linux 32768, macOS/Windows 49152) and not used by any other test file or src default.
|
Warning Review limit reached
Your plan includes 1 review of capacity. Refill in 59 minutes and 54 seconds. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more review capacity refills, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than trial, open-source, and free plans. In all cases, review capacity refills continuously over time. Please see our FAQ for further information. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
test/cli/daemon.test.ts(11138,19138,29138,39138,49138,59338,59339) into a clean9148 – 9208block.32768 – 60999), so any outbound TCP socket on the runner could grab one as its source port and causeEADDRINUSEwhen the daemon tried tolisten(). This is what made master run 26397296711 fail onubuntu-latest(Daemon failed to start: listen EADDRINUSE :::39138).src/common-utils/defaults.ts(9138is the daemon's default RPC).Closes #54
Test plan
npm run build:testpassesnpx vitest run --config config/vitest.config.ts test/cli/daemon.test.ts— 22/22 tests pass locally in 158sOut of scope
The 50xxx Kubo ports in this file are also inside the Linux ephemeral range but haven't flaked yet — happy to do a follow-up if desired.