Package io.debezium.util
Interface Testing.Network
-
- Enclosing interface:
- Testing
public static interface Testing.NetworkNetwork-related utility methods.
-
-
Method Summary
Static Methods Modifier and Type Method Description static intgetAvailablePort()Find a port that is available.
-
-
-
Method Detail
-
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
-
-