You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ay...@apache.org on 2016/04/05 14:35:12 UTC
[3/8] cxf git commit: fix the test error by adjusting its setup for
CXF-5855
fix the test error by adjusting its setup for CXF-5855
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/897d81dc
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/897d81dc
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/897d81dc
Branch: refs/heads/3.1.x-fixes
Commit: 897d81dc292eb6159aab96390cb3fbfed1c34a6b
Parents: a529d27
Author: Akitoshi Yoshida <ay...@apache.org>
Authored: Thu Mar 17 11:17:57 2016 +0100
Committer: Akitoshi Yoshida <ay...@apache.org>
Committed: Tue Apr 5 13:36:57 2016 +0200
----------------------------------------------------------------------
.../websocket/atmosphere/DefaultProtocolInterceptorTest.java | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/897d81dc/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java
----------------------------------------------------------------------
diff --git a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java
index e6b70af..1dee1de 100644
--- a/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java
+++ b/rt/transports/websocket/src/test/java/org/apache/cxf/transport/websocket/atmosphere/DefaultProtocolInterceptorTest.java
@@ -25,7 +25,10 @@ import java.util.Map;
import org.apache.cxf.transport.websocket.WebSocketUtils;
import org.atmosphere.cpr.AtmosphereRequest;
+import org.atmosphere.cpr.AtmosphereResource;
+import org.atmosphere.cpr.AtmosphereResourceImpl;
import org.atmosphere.cpr.AtmosphereResponse;
+import org.atmosphere.cpr.FrameworkConfig;
import org.junit.Assert;
import org.junit.Test;
@@ -40,6 +43,9 @@ public class DefaultProtocolInterceptorTest extends Assert {
DefaultProtocolInterceptor dpi = new DefaultProtocolInterceptor();
AtmosphereRequest request = AtmosphereRequest.newInstance();
AtmosphereResponse response = AtmosphereResponse.newInstance();
+ AtmosphereResourceImpl resource = new AtmosphereResourceImpl();
+ resource.transport(AtmosphereResource.TRANSPORT.WEBSOCKET);
+ request.localAttributes().put(FrameworkConfig.ATMOSPHERE_RESOURCE, resource);
response.request(request);
String payload = "hello cxf";
String contentType = "text/plain";