public class NetworkingTestUtils
extends java.lang.Object
Constructor and Description |
---|
NetworkingTestUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
assertPortsAvailable(java.util.Map<java.lang.String,java.lang.Integer> ports) |
static void |
assertPortsAvailableEventually(java.util.Map<java.lang.String,java.lang.Integer> ports) |
static void |
assertPortsAvailableEventually(java.util.Map<java.lang.String,java.lang.Integer> ports,
Duration timeout) |
static int |
randomPortAround(int seed)
Returns a port not in use somewhere around the seed;
this is not a foolproof way to prevent collisions,
but strikes a good balance of traceability (different callers will use different ranges)
and collision avoidance, esp when combined with
Localhost...obtain(thisResult+"+"); . |
public static void assertPortsAvailableEventually(java.util.Map<java.lang.String,java.lang.Integer> ports)
public static void assertPortsAvailableEventually(java.util.Map<java.lang.String,java.lang.Integer> ports, Duration timeout)
public static void assertPortsAvailable(java.util.Map<java.lang.String,java.lang.Integer> ports)
public static int randomPortAround(int seed)
Localhost...obtain(thisResult+"+");
.