Made testCONNECTAndPOSTWithBigBody() send a bigger body to exercise SelectChannelEndPoint.blockWritable().

This commit is contained in:
Simone Bordet 2012-04-20 15:07:36 +02:00
parent a93ef5fdc3
commit ef7057a4f1
1 changed files with 6 additions and 7 deletions

View File

@ -1,8 +1,5 @@
package org.eclipse.jetty.server.handler; package org.eclipse.jetty.server.handler;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.ByteArrayOutputStream; import java.io.ByteArrayOutputStream;
import java.io.IOException; import java.io.IOException;
@ -12,7 +9,6 @@ import java.io.OutputStream;
import java.net.Socket; import java.net.Socket;
import java.nio.channels.SocketChannel; import java.nio.channels.SocketChannel;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream; import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
@ -26,6 +22,9 @@ import org.eclipse.jetty.toolchain.test.OS;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assume.assumeTrue;
/** /**
* @version $Revision$ $Date$ * @version $Revision$ $Date$
*/ */
@ -375,7 +374,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest
StringBuilder body = new StringBuilder(); StringBuilder body = new StringBuilder();
String chunk = "0123456789ABCDEF"; String chunk = "0123456789ABCDEF";
for (int i = 0; i < 1024; ++i) for (int i = 0; i < 1024 * 1024; ++i)
body.append(chunk); body.append(chunk);
request = "" + request = "" +
@ -488,7 +487,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest
{ {
// TODO needs to be further investigated // TODO needs to be further investigated
assumeTrue(!OS.IS_OSX); assumeTrue(!OS.IS_OSX);
String hostPort = "localhost:" + serverConnector.getLocalPort(); String hostPort = "localhost:" + serverConnector.getLocalPort();
String request = "" + String request = "" +
"CONNECT " + hostPort + " HTTP/1.1\r\n" + "CONNECT " + hostPort + " HTTP/1.1\r\n" +
@ -527,7 +526,7 @@ public class ConnectHandlerTest extends AbstractConnectHandlerTest
{ {
// TODO needs to be further investigated // TODO needs to be further investigated
assumeTrue(!OS.IS_OSX); assumeTrue(!OS.IS_OSX);
String hostPort = "localhost:" + serverConnector.getLocalPort(); String hostPort = "localhost:" + serverConnector.getLocalPort();
String request = "" + String request = "" +
"CONNECT " + hostPort + " HTTP/1.1\r\n" + "CONNECT " + hostPort + " HTTP/1.1\r\n" +