diff options
author | Greg Wilkins | 2011-12-19 23:55:56 +0000 |
---|---|---|
committer | Greg Wilkins | 2011-12-19 23:55:56 +0000 |
commit | b7d8bd4f28160120a8edb1316db5940837d52199 (patch) | |
tree | 4788fbeb207ff4b3fcd94ab9cf20785677247991 /jetty-client/src/test/java/org/eclipse/jetty/client | |
parent | c5c6377e26dff5f99a91fadf1029cc5074cd4ad4 (diff) | |
download | org.eclipse.jetty.project-b7d8bd4f28160120a8edb1316db5940837d52199.tar.gz org.eclipse.jetty.project-b7d8bd4f28160120a8edb1316db5940837d52199.tar.xz org.eclipse.jetty.project-b7d8bd4f28160120a8edb1316db5940837d52199.zip |
364638 HttpParser closes if data received while seeking EOF. Tests fixed to cope
Diffstat (limited to 'jetty-client/src/test/java/org/eclipse/jetty/client')
-rw-r--r-- | jetty-client/src/test/java/org/eclipse/jetty/client/TimeoutTest.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/jetty-client/src/test/java/org/eclipse/jetty/client/TimeoutTest.java b/jetty-client/src/test/java/org/eclipse/jetty/client/TimeoutTest.java index abe37a7f66..4aefca5514 100644 --- a/jetty-client/src/test/java/org/eclipse/jetty/client/TimeoutTest.java +++ b/jetty-client/src/test/java/org/eclipse/jetty/client/TimeoutTest.java @@ -217,7 +217,6 @@ public class TimeoutTest * The connection should be closed by the server */ @Test - @Ignore public void testServerCloseClientMoreDataSent() throws Exception { // Log.getLogger("").setDebugEnabled(true); @@ -387,6 +386,22 @@ public class TimeoutTest Assert.assertTrue("close not received",serverEndPoint.get().isInputShutdown()); Assert.assertEquals("one request handled",1,httpRequests.get()); + + + // client will eventually get broken pipe if it keeps writing + try + { + for (int i=0;i<1000;i++) + { + clientOutput.write(req.toString().getBytes("UTF-8")); + clientOutput.flush(); + } + Assert.fail("Client should have seen a broken pipe"); + } + catch(IOException e) + { + // expected broken pipe + } } finally |