changeset 8378:077237e4613f

8023555: test/java/net/Socks/SocksProxyVersion.java fails when machine name is localhost Reviewed-by: chegar, alanb
author tyan
date Mon, 14 Oct 2013 11:47:54 +0100
parents 9f8bfdd99129
children f15a0087181e
files test/java/net/Socks/SocksProxyVersion.java
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/test/java/net/Socks/SocksProxyVersion.java	Mon Oct 14 10:42:36 2013 +0200
+++ b/test/java/net/Socks/SocksProxyVersion.java	Mon Oct 14 11:47:54 2013 +0100
@@ -41,6 +41,10 @@
     volatile boolean failed;
 
     public static void main(String[] args) throws Exception {
+        if (InetAddress.getLocalHost().isLoopbackAddress()) {
+            System.out.println("Test cannot run. getLocalHost returns a loopback address");
+            return;
+        }
         new SocksProxyVersion();
     }