Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Wilkins2010-11-16 13:38:51 +0000
committerGreg Wilkins2010-11-16 13:38:51 +0000
commitff2239a2ba0de88e29fb83c7e1209a7b15e4950b (patch)
tree7a772942f682f8a4d3caddfd7a736b04b096877c /test-continuation
parent52ac3598f8c840d953a63fcf7f0fb062c45583ac (diff)
downloadorg.eclipse.jetty.project-ff2239a2ba0de88e29fb83c7e1209a7b15e4950b.tar.gz
org.eclipse.jetty.project-ff2239a2ba0de88e29fb83c7e1209a7b15e4950b.tar.xz
org.eclipse.jetty.project-ff2239a2ba0de88e29fb83c7e1209a7b15e4950b.zip
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
Diffstat (limited to 'test-continuation')
-rw-r--r--test-continuation/src/main/java/org/eclipse/jetty/continuation/test/ContinuationBase.java18
1 files 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 8508433ad5..7718c8e116 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;
}

Back to the top