Skip to content

Commit ba092e9

Browse files
committed
Merge branch '2.x'
2 parents fcc8e8f + f5f6d05 commit ba092e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

integration-test/src/test/java/org/cloudfoundry/RandomNameFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
package org.cloudfoundry;
1818

19+
import org.springframework.util.SocketUtils;
1920
import reactor.core.Exceptions;
2021

2122
import java.math.BigInteger;
@@ -51,7 +52,7 @@ public String getName(String prefix) {
5152

5253
@Override
5354
public int getPort() {
54-
return PORT_MINIMUM + this.random.nextInt(PORT_MAXIMUM - PORT_MINIMUM);
55+
return SocketUtils.findAvailableTcpPort(PORT_MINIMUM, PORT_MAXIMUM);
5556
}
5657

5758
@Override

0 commit comments

Comments
 (0)