You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/04/09 00:15:19 UTC
svn commit: r1585852 -
/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
Author: sebb
Date: Tue Apr 8 22:15:19 2014
New Revision: 1585852
URL: http://svn.apache.org/r1585852
Log:
Check that localhost resolves as expected
Modified:
commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
Modified: commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java?rev=1585852&r1=1585851&r2=1585852&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java (original)
+++ commons/proper/jcs/trunk/src/test/org/apache/commons/jcs/auxiliary/remote/server/BasicRemoteCacheClientServerUnitTest.java Tue Apr 8 22:15:19 2014
@@ -19,6 +19,8 @@ package org.apache.commons.jcs.auxiliary
* under the License.
*/
+import java.net.InetAddress;
+
import junit.framework.TestCase;
import org.apache.commons.jcs.auxiliary.AuxiliaryCache;
@@ -249,4 +251,9 @@ public class BasicRemoteCacheClientServe
throw e;
}
}
+
+ public void testLocalHost() throws Exception {
+ final InetAddress byName = InetAddress.getByName("localhost");
+ assertTrue("Expected localhost ("+byName.getHostAddress()+") to be a loopback address", byName.isLoopbackAddress());
+ }
}