Author: ningjiang
Date: Mon Nov 17 23:10:51 2008
New Revision: 718513

URL: http://svn.apache.org/viewvc?rev=718513&view=rev
Log:
CAMEL-1091 removed the IPV6 test

Modified:
    
activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java

Modified: 
activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java?rev=718513&r1=718512&r2=718513&view=diff
==============================================================================
--- 
activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java
 (original)
+++ 
activemq/camel/trunk/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/InterfacesTest.java
 Mon Nov 17 23:10:51 2008
@@ -14,28 +14,27 @@
 public class InterfacesTest extends ContextTestSupport {
     
     private String remoteInterfaceAddress;
-    private String remoteInterfaceAddressV6;
+   
     
     public InterfacesTest() throws IOException {
         // Retrieve an address of some remote network interface
         Enumeration<NetworkInterface> interfaces =  
NetworkInterface.getNetworkInterfaces();
         
-        while((remoteInterfaceAddressV6 == null || remoteInterfaceAddress == 
null)
-                && interfaces.hasMoreElements()) {
+        while (remoteInterfaceAddress == null && interfaces.hasMoreElements()) 
{
             NetworkInterface interfaze = interfaces.nextElement();
             Enumeration<InetAddress> addresses =  interfaze.getInetAddresses();
-            if(addresses.hasMoreElements()) {                
+            if (addresses.hasMoreElements()) {
                 InetAddress nextAddress = addresses.nextElement();
                 if (nextAddress.isLoopbackAddress() || 
!nextAddress.isReachable(2000)) {
                     continue;
                 }
                 if (nextAddress instanceof Inet6Address) {
-                    remoteInterfaceAddressV6 = nextAddress.getHostAddress();
+                    continue;
                 } else {
                     remoteInterfaceAddress = nextAddress.getHostAddress();
                 }
             }
-        };
+        }
     }
     
     public void testLocalInterfaceHandled() throws IOException, 
InterruptedException {
@@ -58,24 +57,8 @@
         }
         
         assertMockEndpointsSatisfied();
-    }
-    
-    public void testInterfaceIpV6Handled() throws IOException, 
InterruptedException {
-        if (remoteInterfaceAddressV6 == null) {
-            return;
-        }
-        getMockEndpoint("mock:endpoint").expectedMessageCount(2);
-        
-        URL allInterfacesUrl = new URL("http://["; + remoteInterfaceAddressV6 + 
"]:5567/testRoute");
-        String allInterfacesResponse = 
IOUtils.toString(allInterfacesUrl.openStream());
-        assertEquals("allInterfacesV6", allInterfacesResponse);
-
-        URL oneInterfaceUrl = new URL("http://["; + remoteInterfaceAddressV6 + 
"]:5568/testRoute");
-        String oneInterfaceResponse = 
IOUtils.toString(oneInterfaceUrl.openStream());
-        assertEquals("remoteV6", oneInterfaceResponse);
-        
-        assertMockEndpointsSatisfied();
     }    
+      
     
     public void testAllInterfaces() throws Exception {
         int expectedMessages = (remoteInterfaceAddress != null) ? 2 : 1;
@@ -118,15 +101,6 @@
                     .setBody().constant("allInterfaces")
                     .to("mock:endpoint");
                 
-                if (remoteInterfaceAddressV6 != null) {
-                    from("jetty:http://[0:0:0:0:0:0:0:0]:5567/testRoute";)
-                        .setBody().constant("allInterfacesV6")
-                        .to("mock:endpoint");
-                    
-                    from("jetty:http://["; + remoteInterfaceAddressV6 + 
"]:5568/testRoute")
-                        .setBody().constant("remoteV6")
-                        .to("mock:endpoint"); 
-                }
             }
         };
     }


Reply via email to