kafka-junit
kafka-junit copied to clipboard
Ensure getUniqueEphemeralPorts returns only free ports
getUniqueEphemeralPorts doesn't check whether the ports are free or in use.
To avoid a port that is in use call new ServerSocket(0) that finds a random ephemeral port that is free.
Fixes #98