public class NetworkingTestUtils extends Object
| Constructor and Description |
|---|
NetworkingTestUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
assertPortsAvailable(Map<String,Integer> ports) |
static void |
assertPortsAvailableEventually(Map<String,Integer> ports) |
static void |
assertPortsAvailableEventually(Map<String,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(Map<String,Integer> ports)
public static void assertPortsAvailableEventually(Map<String,Integer> ports, Duration timeout)
@Beta public static int randomPortAround(int seed)
Localhost...obtain(thisResult+"+");.Copyright © 2012–2020 The Apache Software Foundation. All rights reserved.