Skip to content

Commit 36f77d0

Browse files
author
Vladimir Kotal
committed
try loopback instead of localhost
1 parent 449fe78 commit 36f77d0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

plugins/src/test/java/opengrok/auth/plugin/LdapServerTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ public void testSetGetUsername() {
8080
@Test
8181
public void testIsReachable() throws IOException, InterruptedException, URISyntaxException {
8282
// Start simple TCP server on test port.
83-
InetAddress localhostAddr = InetAddress.getLocalHost();
83+
InetAddress localhostAddr = InetAddress.getLoopbackAddress();
8484
try (ServerSocket serverSocket = new ServerSocket(0, 1, localhostAddr)) {
8585
Thread thread = new Thread(() -> {
8686
try {

0 commit comments

Comments
 (0)