|
1 | 1 | package com.rabbitmq.client.test.server; |
2 | 2 |
|
3 | | -import com.rabbitmq.client.Address; |
4 | 3 | import com.rabbitmq.client.AuthenticationFailureException; |
5 | | -import com.rabbitmq.client.Connection; |
6 | 4 | import com.rabbitmq.client.ConnectionFactory; |
7 | 5 | import com.rabbitmq.tools.Host; |
8 | 6 | import junit.framework.TestCase; |
@@ -73,19 +71,20 @@ private ConnectionFactory getFactory(String name, String addr) { |
73 | 71 |
|
74 | 72 | // Find the first IP address of a network interface that is up, not loopback, not point to point (e.g. VPN thing) |
75 | 73 | private static InetAddress findRealIPAddress() throws SocketException { |
76 | | - Enumeration<NetworkInterface> ifs = NetworkInterface.getNetworkInterfaces(); |
77 | | - while (ifs.hasMoreElements()) { |
78 | | - NetworkInterface nif = ifs.nextElement(); |
79 | | - if (nif.isUp() && !nif.isPointToPoint() && !nif.isLoopback() && !nif.isVirtual()) { |
80 | | - Enumeration<InetAddress> addrs = nif.getInetAddresses(); |
81 | | - while (addrs.hasMoreElements()) { |
82 | | - InetAddress addr = addrs.nextElement(); |
83 | | - if (addr instanceof Inet4Address) { |
84 | | - return addr; |
85 | | - } |
86 | | - } |
87 | | - } |
88 | | - } |
89 | | - throw new RuntimeException("Could not determine real network address"); |
| 74 | + throw new RuntimeException("this test will be enabled once we stop supporting Java 1.5"); |
| 75 | +// Enumeration<NetworkInterface> ifs = NetworkInterface.getNetworkInterfaces(); |
| 76 | +// while (ifs.hasMoreElements()) { |
| 77 | +// NetworkInterface nif = ifs.nextElement(); |
| 78 | +// if (nif.isUp() && !nif.isPointToPoint() && !nif.isLoopback() && !nif.isVirtual()) { |
| 79 | +// Enumeration<InetAddress> addrs = nif.getInetAddresses(); |
| 80 | +// while (addrs.hasMoreElements()) { |
| 81 | +// InetAddress addr = addrs.nextElement(); |
| 82 | +// if (addr instanceof Inet4Address) { |
| 83 | +// return addr; |
| 84 | +// } |
| 85 | +// } |
| 86 | +// } |
| 87 | +// } |
| 88 | +// throw new RuntimeException("Could not determine real network address"); |
90 | 89 | } |
91 | 90 | } |
0 commit comments