improved test
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@2535 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
59f5bcce5b
commit
c686749cc3
|
@ -686,7 +686,7 @@ public class Server extends HandlerWrapper implements Attributes
|
|||
}
|
||||
|
||||
/* ------------------------------------------------------------ */
|
||||
public static void main(String[] args)
|
||||
public static void main(String...args) throws Exception
|
||||
{
|
||||
System.err.println(getVersion());
|
||||
}
|
||||
|
|
|
@ -494,12 +494,12 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
|
|||
}
|
||||
|
||||
// Check that a direct content buffer was used as a chunk
|
||||
Assert.assertEquals(1024*1024,max);
|
||||
Assert.assertEquals(128*1024,max);
|
||||
|
||||
// read and check the times are < 900ms
|
||||
// read and check the times are < 999ms
|
||||
String[] times=in.readLine().split(",");
|
||||
for (String t:times)
|
||||
Assert.assertTrue(Integer.valueOf(t).intValue()<900);
|
||||
Assert.assertTrue(Integer.valueOf(t).intValue()<999);
|
||||
|
||||
// read the EOF chunk
|
||||
String end=in.readLine();
|
||||
|
@ -524,12 +524,12 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
|
|||
Assert.assertTrue(closed);
|
||||
|
||||
String bigline = in.readLine();
|
||||
Assert.assertEquals(10*1024*1024,bigline.length());
|
||||
Assert.assertEquals(10*128*1024,bigline.length());
|
||||
|
||||
// read and check the times are < 900ms
|
||||
// read and check the times are < 999ms
|
||||
times=in.readLine().split(",");
|
||||
for (String t:times)
|
||||
Assert.assertTrue(Integer.valueOf(t).intValue()<900);
|
||||
Assert.assertTrue(Integer.valueOf(t).intValue()<999);
|
||||
|
||||
// check close
|
||||
Assert.assertTrue(in.readLine()==null);
|
||||
|
@ -544,7 +544,7 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
|
|||
{
|
||||
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException
|
||||
{
|
||||
byte[] buf = new byte[1024*1024];
|
||||
byte[] buf = new byte[128*1024];
|
||||
for (int i=0;i<buf.length;i++)
|
||||
buf[i]=(byte)("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_".charAt(i%63));
|
||||
|
||||
|
|
Loading…
Reference in New Issue