From ff2239a2ba0de88e29fb83c7e1209a7b15e4950b Mon Sep 17 00:00:00 2001 From: Greg Wilkins Date: Tue, 16 Nov 2010 13:38:51 +0000 Subject: [PATCH] improved test harness - removed arbitrary waits git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2514 7e9141cc-0065-0410-87d8-b60c137991c4 --- .../continuation/test/ContinuationBase.java | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/test-continuation/src/main/java/org/eclipse/jetty/continuation/test/ContinuationBase.java b/test-continuation/src/main/java/org/eclipse/jetty/continuation/test/ContinuationBase.java index 8508433ad53..7718c8e1167 100644 --- a/test-continuation/src/main/java/org/eclipse/jetty/continuation/test/ContinuationBase.java +++ b/test-continuation/src/main/java/org/eclipse/jetty/continuation/test/ContinuationBase.java @@ -237,10 +237,20 @@ public abstract class ContinuationBase extends TestCase request+="Content-Length: "+content.length()+"\r\n"; request+="\r\n" + content; - Socket socket = new Socket("localhost",_port); - socket.getOutputStream().write(request.getBytes("UTF-8")); - - String response = toString(socket.getInputStream()); + int port=_port; + String response=null; + try + { + Socket socket = new Socket("localhost",port); + socket.getOutputStream().write(request.getBytes("UTF-8")); + + response = toString(socket.getInputStream()); + } + catch(Exception e) + { + System.err.println("failed on port "+port); + throw e; + } return response; }