cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject cxf git commit: [CXF-6329] fix the test
Date Fri, 03 Apr 2015 11:54:55 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes fa75fd792 -> 546dd30e4


[CXF-6329] fix the test


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/546dd30e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/546dd30e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/546dd30e

Branch: refs/heads/3.0.x-fixes
Commit: 546dd30e44efbc001a8470928fee9621d71c681d
Parents: fa75fd7
Author: Akitoshi Yoshida <ay@apache.org>
Authored: Fri Apr 3 13:52:54 2015 +0200
Committer: Akitoshi Yoshida <ay@apache.org>
Committed: Fri Apr 3 13:53:55 2015 +0200

----------------------------------------------------------------------
 ...AtmosphereWebSocketJettyDestinationTest.java | 23 +++++++++++++++-----
 ...mosphereWebSocketServletDestinationTest.java | 23 +++++++++++++++-----
 2 files changed, 36 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/546dd30e/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketJettyDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketJettyDestinationTest.java
b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketJettyDestinationTest.java
index 36e2aa2..3748357 100644
--- a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketJettyDestinationTest.java
+++ b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketJettyDestinationTest.java
@@ -53,8 +53,14 @@ public class AtmosphereWebSocketJettyDestinationTest extends Assert {
             new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
 
         List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
-        assertEquals(1, ais.size());
-        assertEquals(DefaultProtocolInterceptor.class, ais.get(0).getClass());
+        int added = 0;
+        for (AtmosphereInterceptor a : ais) {
+            if (DefaultProtocolInterceptor.class.equals(a.getClass())) {
+                added++;
+                break;
+            }
+        }
+        assertEquals(1, added);
     }
 
     @Test
@@ -70,9 +76,16 @@ public class AtmosphereWebSocketJettyDestinationTest extends Assert {
             new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
 
         List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
-        assertEquals(2, ais.size());
-        assertEquals(CustomInterceptor1.class, ais.get(0).getClass());
-        assertEquals(CustomInterceptor2.class, ais.get(1).getClass());
+        int added = 0;
+        for (AtmosphereInterceptor a : ais) {
+            if (CustomInterceptor1.class.equals(a.getClass())) {
+                added++;
+            } else if (CustomInterceptor2.class.equals(a.getClass())) {
+                added++;
+                break;
+            } 
+        }
+        assertEquals(2, added);
     }
     
     private static class CustomInterceptor1 extends DefaultProtocolInterceptor {

http://git-wip-us.apache.org/repos/asf/cxf/blob/546dd30e/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketServletDestinationTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketServletDestinationTest.java
b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketServletDestinationTest.java
index db269c6..5a3135d 100644
--- a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketServletDestinationTest.java
+++ b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/AtmosphereWebSocketServletDestinationTest.java
@@ -74,8 +74,14 @@ public class AtmosphereWebSocketServletDestinationTest extends Assert {
             new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
 
         List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
-        assertEquals(1, ais.size());
-        assertEquals(DefaultProtocolInterceptor.class, ais.get(0).getClass());
+        int added = 0;
+        for (AtmosphereInterceptor a : ais) {
+            if (DefaultProtocolInterceptor.class.equals(a.getClass())) {
+                added++;
+                break;
+            }
+        }
+        assertEquals(1, added);
     }
 
     @Test
@@ -91,9 +97,16 @@ public class AtmosphereWebSocketServletDestinationTest extends Assert {
             new AtmosphereWebSocketServletDestination(bus, registry, endpoint, ENDPOINT_ADDRESS);
 
         List<AtmosphereInterceptor> ais = dest.getAtmosphereFramework().interceptors();
-        assertEquals(2, ais.size());
-        assertEquals(CustomInterceptor1.class, ais.get(0).getClass());
-        assertEquals(CustomInterceptor2.class, ais.get(1).getClass());
+        int added = 0;
+        for (AtmosphereInterceptor a : ais) {
+            if (CustomInterceptor1.class.equals(a.getClass())) {
+                added++;
+            } else if (CustomInterceptor2.class.equals(a.getClass())) {
+                added++;
+                break;
+            } 
+        }
+        assertEquals(2, added);
     }
     
     private static class TestAtmosphereWebSocketServletDestination extends AtmosphereWebSocketServletDestination
{


Mime
View raw message