From 3d2ddb2612b74284778d33ccd3b06efe014f4c30 Mon Sep 17 00:00:00 2001 From: rusefi Date: Wed, 8 Jul 2020 00:58:44 -0400 Subject: [PATCH] is "localhost" better? --- .../java/com/rusefi/io/TcpCommunicationIntegrationTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/java_console/ui/src/test/java/com/rusefi/io/TcpCommunicationIntegrationTest.java b/java_console/ui/src/test/java/com/rusefi/io/TcpCommunicationIntegrationTest.java index 7221874b6c..7ef159527e 100644 --- a/java_console/ui/src/test/java/com/rusefi/io/TcpCommunicationIntegrationTest.java +++ b/java_console/ui/src/test/java/com/rusefi/io/TcpCommunicationIntegrationTest.java @@ -24,6 +24,7 @@ import static org.junit.Assert.assertTrue; public class TcpCommunicationIntegrationTest { private static final Logger LOGGER = Logger.CONSOLE; + private static final String LOCALHOST = "localhost"; // todo: implement & test TCP connector restart! @Test @@ -62,7 +63,7 @@ public class TcpCommunicationIntegrationTest { // todo: remove CONFIGURATION_RUSEFI_BINARY or nicer API to disable local file load LinkManager clientManager = new LinkManager(LOGGER); - clientManager.startAndConnect(Integer.toString(port), new ConnectionStateListener() { + clientManager.startAndConnect(LOCALHOST + ":" + port, new ConnectionStateListener() { @Override public void onConnectionEstablished() { connectionEstablishedCountDownLatch.countDown(); @@ -93,7 +94,7 @@ public class TcpCommunicationIntegrationTest { BinaryProtocolServer server = createVirtualController(serverImage, controllerPort); int proxyPort = 6103; - BinaryProtocolProxy.createProxy(new Socket("127.0.0.1", controllerPort), proxyPort); + BinaryProtocolProxy.createProxy(new Socket("localhost", controllerPort), proxyPort); CountDownLatch connectionEstablishedCountDownLatch = new CountDownLatch(1);