lighthouse/beacon_node/http_api/tests
Michael Sproul 4b6cb3db2c Prevent port re-use in HTTP API tests (#4745)
## Issue Addressed

CI is plagued by `AddrAlreadyInUse` failures, which are caused by race conditions in allocating free ports.

This PR removes all usages of the `unused_port` crate for Lighthouse's HTTP API, in favour of passing `:0` as the listen address. As a result, the listen address isn't known ahead of time and must be read from the listening socket after it binds. This requires tying some self-referential knots, which is a little disruptive, but hopefully doesn't clash too much with Deneb 🤞

There are still a few usages of `unused_tcp4_port` left in cases where we start external processes, like the `watch` Postgres DB, Anvil, Geth, Nethermind, etc. Removing these usages is non-trivial because it's hard to read the port back from an external process after starting it with `--port 0`. We might be able to do something on Linux where we read from `/proc/`, but I'll leave that for future work.
2023-09-20 01:19:03 +00:00
..
broadcast_validation_tests.rs Send success code for duplicate blocks on HTTP (#4655) 2023-08-28 00:55:31 +00:00
fork_tests.rs Remove hidden re-exports to appease Rust 1.73 (#4495) 2023-07-12 07:06:00 +00:00
interactive_tests.rs Fix HTTP state API bug and add --epochs-per-migration (#4236) 2023-07-17 00:14:12 +00:00
main.rs Add broadcast validation routes to Beacon Node HTTP API (#4316) 2023-06-29 12:02:38 +00:00
status_tests.rs Update node health endpoint (#4310) 2023-06-30 01:13:04 +00:00
tests.rs Prevent port re-use in HTTP API tests (#4745) 2023-09-20 01:19:03 +00:00