From 32bb49e8298604e93179d8878cc5c1cc26f3cf32 Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 18 Aug 2015 23:17:43 +0200 Subject: [PATCH] [TEST] Make it clear what address we try to bind --- .../test/discovery/ClusterDiscoveryConfiguration.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/src/test/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java b/core/src/test/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java index f3c0da986e2..a170cd128be 100644 --- a/core/src/test/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java +++ b/core/src/test/java/org/elasticsearch/test/discovery/ClusterDiscoveryConfiguration.java @@ -150,8 +150,7 @@ public class ClusterDiscoveryConfiguration extends SettingsSource { try (ServerSocket serverSocket = new ServerSocket()) { // Set SO_REUSEADDR as we may bind here and not be able to reuse the address immediately without it. serverSocket.setReuseAddress(NetworkUtils.defaultReuseAddress()); - serverSocket.bind(new InetSocketAddress(nextPort)); - + serverSocket.bind(new InetSocketAddress("127.0.0.1", nextPort)); // bind was a success foundPortInRange = true; unicastHostPorts[i] = nextPort;