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
This commit is contained in:
parent
52ac3598f8
commit
ff2239a2ba
|
@ -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"));
|
||||
int port=_port;
|
||||
String response=null;
|
||||
try
|
||||
{
|
||||
Socket socket = new Socket("localhost",port);
|
||||
socket.getOutputStream().write(request.getBytes("UTF-8"));
|
||||
|
||||
String response = toString(socket.getInputStream());
|
||||
response = toString(socket.getInputStream());
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
System.err.println("failed on port "+port);
|
||||
throw e;
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue