localhost_port_range_for_tests

Function localhost_port_range_for_tests 

Source
pub fn localhost_port_range_for_tests() -> (u16, u16)
👎Deprecated since 3.1.0: This crate has been marked for formal inclusion in the Agave Unstable API. From v4.0.0 onward, the agave-unstable-api crate feature must be specified to acknowledge use of an interface that may break without warning.
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.