We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents fcc8e8f + f5f6d05 commit ba092e9Copy full SHA for ba092e9
integration-test/src/test/java/org/cloudfoundry/RandomNameFactory.java
@@ -16,6 +16,7 @@
16
17
package org.cloudfoundry;
18
19
+import org.springframework.util.SocketUtils;
20
import reactor.core.Exceptions;
21
22
import java.math.BigInteger;
@@ -51,7 +52,7 @@ public String getName(String prefix) {
51
52
53
@Override
54
public int getPort() {
- return PORT_MINIMUM + this.random.nextInt(PORT_MAXIMUM - PORT_MINIMUM);
55
+ return SocketUtils.findAvailableTcpPort(PORT_MINIMUM, PORT_MAXIMUM);
56
}
57
58
0 commit comments