Use inet address rather than host name

Signed-off-by: Emmanuel Bigeon <emmanuel@bigeon.fr>
This commit is contained in:
Emmanuel Bigeon 2018-11-30 16:02:22 -05:00
parent 9f273f7595
commit 09e9c69fe0

View File

@ -77,7 +77,7 @@ public class SocketConsoleApplicationTest {
public void testIntegration() throws IOException, InterruptedException { public void testIntegration() throws IOException, InterruptedException {
Thread server; Thread server;
server = TestServer.getServer(); server = TestServer.getServer();
final String hostName = InetAddress.getLocalHost().getHostName(); final InetAddress hostName = InetAddress.getLocalHost();
final int portNumber = TestServer.PORT; final int portNumber = TestServer.PORT;
try (Socket kkSocket = new Socket(hostName, portNumber); try (Socket kkSocket = new Socket(hostName, portNumber);