pub fn localhost_port_range_for_tests() -> (u16, u16)
Expand description
Retrieve a free 25-port slice for unit tests
When running under nextest, this will try to provide a unique slice of port numbers (assuming no other nextest processes are running on the same host) based on NEXTEST_TEST_GLOBAL_SLOT variable The port ranges will be reused following nextest logic.
When running without nextest, this will only bump an atomic and eventually panic when it runs out of port numbers to assign.