[TEST] Make it clear what address we try to bind

This commit is contained in:
Simon Willnauer 2015-08-18 23:17:43 +02:00
parent 0ffd99cca3
commit 32bb49e829
1 changed files with 1 additions and 2 deletions

View File

@ -150,8 +150,7 @@ public class ClusterDiscoveryConfiguration extends SettingsSource {
try (ServerSocket serverSocket = new ServerSocket()) { try (ServerSocket serverSocket = new ServerSocket()) {
// Set SO_REUSEADDR as we may bind here and not be able to reuse the address immediately without it. // Set SO_REUSEADDR as we may bind here and not be able to reuse the address immediately without it.
serverSocket.setReuseAddress(NetworkUtils.defaultReuseAddress()); serverSocket.setReuseAddress(NetworkUtils.defaultReuseAddress());
serverSocket.bind(new InetSocketAddress(nextPort)); serverSocket.bind(new InetSocketAddress("127.0.0.1", nextPort));
// bind was a success // bind was a success
foundPortInRange = true; foundPortInRange = true;
unicastHostPorts[i] = nextPort; unicastHostPorts[i] = nextPort;