Package io.debezium.util
Interface Testing.Network
- Enclosing interface:
- Testing
public static interface Testing.Network
Network-related utility methods.
-
Method Summary
Static Methods
-
Method Details
-
getAvailablePort
static int getAvailablePort()Find a port that is available. This method starts aServerSocketand obtains the port on which the socket is listening, and then shuts down the socket so the port becomes available.- Returns:
- the number of the now-available port
-