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:
Greg Wilkins 2010-11-18 01:55:20 +00:00
parent 59f5bcce5b
commit c686749cc3
2 changed files with 8 additions and 8 deletions

View File

@ -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()); System.err.println(getVersion());
} }

View File

@ -494,12 +494,12 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
} }
// Check that a direct content buffer was used as a chunk // 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(","); String[] times=in.readLine().split(",");
for (String t:times) for (String t:times)
Assert.assertTrue(Integer.valueOf(t).intValue()<900); Assert.assertTrue(Integer.valueOf(t).intValue()<999);
// read the EOF chunk // read the EOF chunk
String end=in.readLine(); String end=in.readLine();
@ -524,12 +524,12 @@ public abstract class HttpServerTestBase extends HttpServerTestFixture
Assert.assertTrue(closed); Assert.assertTrue(closed);
String bigline = in.readLine(); 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(","); times=in.readLine().split(",");
for (String t:times) for (String t:times)
Assert.assertTrue(Integer.valueOf(t).intValue()<900); Assert.assertTrue(Integer.valueOf(t).intValue()<999);
// check close // check close
Assert.assertTrue(in.readLine()==null); 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 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++) for (int i=0;i<buf.length;i++)
buf[i]=(byte)("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_".charAt(i%63)); buf[i]=(byte)("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_".charAt(i%63));