Remove unnecessary socket.setReuseAddress() in test extensions

This commit is contained in:
Chris Eager
2024-10-18 11:23:35 -05:00
committed by Chris Eager
parent c6843c1eae
commit b5db8eba06
3 changed files with 3 additions and 9 deletions

View File

@@ -202,7 +202,6 @@ public class RedisClusterExtension implements BeforeAllCallback, BeforeEachCallb
final int maxIterations = 11_000;
for (int i = 0; i < maxIterations; i++) {
try (final ServerSocket socket = new ServerSocket(0)) {
socket.setReuseAddress(false);
final int port = socket.getLocalPort();
if (port < 55535) {
return port;

View File

@@ -93,7 +93,6 @@ public class RedisServerExtension implements BeforeAllCallback, BeforeEachCallba
private static int getAvailablePort() throws IOException {
try (ServerSocket socket = new ServerSocket(0)) {
socket.setReuseAddress(false);
return socket.getLocalPort();
}
}