Flush/close during test in case the stream is buffering
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2ec87597 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2ec87597 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2ec87597 Branch: refs/heads/3.1.x-fixes Commit: 2ec875978a50cd34d07bd7d3bbfc8583fd30250b Parents: 033815a Author: Daniel Kulp <[email protected]> Authored: Wed Nov 11 10:48:57 2015 -0500 Committer: Daniel Kulp <[email protected]> Committed: Thu Nov 12 10:23:10 2015 -0500 ---------------------------------------------------------------------- .../org/apache/cxf/systest/jaxrs/websocket/BookStoreWebSocket.java | 2 ++ 1 file changed, 2 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/2ec87597/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/BookStoreWebSocket.java ---------------------------------------------------------------------- diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/BookStoreWebSocket.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/BookStoreWebSocket.java index bc38f43..39e64fc 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/BookStoreWebSocket.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/websocket/BookStoreWebSocket.java @@ -96,7 +96,9 @@ public class BookStoreWebSocket { for (int r = 2, i = 1; i <= 5; r *= 2, i++) { Thread.sleep(500); out.write(Integer.toString(r).getBytes()); + out.flush(); } + out.close(); } catch (Exception e) { e.printStackTrace(); }
