cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject git commit: [CXF-5339] Enabling the servlet stream test
Date Thu, 27 Feb 2014 18:07:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 764404893 -> a7c4de45e


[CXF-5339] Enabling the servlet stream test


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

Branch: refs/heads/master
Commit: a7c4de45e6d5b8747801b905c12adc3dce9ee028
Parents: 7644048
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Thu Feb 27 18:06:07 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Thu Feb 27 18:06:07 2014 +0000

----------------------------------------------------------------------
 .../apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java | 11 ++++++++++-
 .../jaxrs/websocket/JAXRSClientServerWebSocketTest.java  |  1 -
 2 files changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/a7c4de45/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
index 5c20748..ce5478d 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/impl/ServletOutputStreamFilter.java
@@ -38,8 +38,17 @@ public class ServletOutputStreamFilter extends ServletOutputStream {
     
     @Override
     public void write(int b) throws IOException {
-        m.getExchange().put(AbstractHTTPDestination.RESPONSE_COMMITED, Boolean.TRUE);
+        setComittedStatus();
+        os.write(b);
+    }
+    
+    @Override
+    public void write(byte[] b) throws IOException {
+        setComittedStatus();
         os.write(b);
     }
 
+    private void setComittedStatus() {
+        m.getExchange().put(AbstractHTTPDestination.RESPONSE_COMMITED, Boolean.TRUE);
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/a7c4de45/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java
----------------------------------------------------------------------
diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java
b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java
index ec2bceb..be9058d 100644
--- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java
+++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/JAXRSClientServerWebSocketTest.java
@@ -90,7 +90,6 @@ public class JAXRSClientServerWebSocketTest extends AbstractBusClientServerTestB
     }
     
     @Test
-    @Ignore
     public void testBookWithWebSocketServletStream() throws Exception {
         String address = "ws://localhost:" + PORT + "/web/bookstore";
 


Mime
View raw message