You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by se...@apache.org on 2015/09/20 23:11:41 UTC

svn commit: r1704202 - in /directory/apacheds/trunk/ldap-client-test/src: main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java

Author: seelmann
Date: Sun Sep 20 21:11:37 2015
New Revision: 1704202

URL: http://svn.apache.org/viewvc?rev=1704202&view=rev
Log:
Replace more occurrences of localhost with InetAddress.getLocalHost().getHostName()

Modified:
    directory/apacheds/trunk/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java
    directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java

Modified: directory/apacheds/trunk/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java?rev=1704202&r1=1704201&r2=1704202&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/main/java/org/apache/directory/shared/client/api/LdapApiIntegrationUtils.java Sun Sep 20 21:11:37 2015
@@ -189,7 +189,7 @@ public final class LdapApiIntegrationUti
      */
     public static LdapConnection getAnonymousNetworkConnection( LdapServer ldapServer ) throws Exception
     {
-        LdapConnection connection = new LdapNetworkConnection( "localHost", ldapServer.getPort() );
+        LdapConnection connection = new LdapNetworkConnection( InetAddress.getLocalHost().getHostName(), ldapServer.getPort() );
         connection.setTimeOut( 0L );
         connection.bind();
 

Modified: directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java?rev=1704202&r1=1704201&r2=1704202&view=diff
==============================================================================
--- directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java (original)
+++ directory/apacheds/trunk/ldap-client-test/src/test/java/org/apache/directory/shared/client/api/LdapConnectionPoolTest.java Sun Sep 20 21:11:37 2015
@@ -22,6 +22,7 @@ package org.apache.directory.shared.clie
 
 import static org.junit.Assert.assertNotNull;
 
+import java.net.InetAddress;
 import java.util.concurrent.CountDownLatch;
 import java.util.concurrent.TimeUnit;
 
@@ -109,7 +110,7 @@ public class LdapConnectionPoolTest exte
         int port = getLdapServer().getPort();
 
         LdapConnectionConfig config = new LdapConnectionConfig();
-        config.setLdapHost( "localHost" );
+        config.setLdapHost( InetAddress.getLocalHost().getHostName() );
         config.setLdapPort( port );
         config.setName( DEFAULT_ADMIN );
         config.setCredentials( DEFAULT_PASSWORD );
@@ -231,7 +232,7 @@ public class LdapConnectionPoolTest exte
     public void testSmallPool() throws Exception
     {
         LdapConnectionConfig config = new LdapConnectionConfig();
-        config.setLdapHost( "localHost" );
+        config.setLdapHost( InetAddress.getLocalHost().getHostName() );
         config.setLdapPort( getLdapServer().getPort() );
         config.setName( DEFAULT_ADMIN );
         config.setCredentials( DEFAULT_PASSWORD );