updates from review

This commit is contained in:
gregw 2021-02-16 17:48:49 +01:00
parent e2c710e086
commit 6b1a8c376f
2 changed files with 9 additions and 9 deletions

View File

@ -380,7 +380,7 @@ public class HttpConnection extends AbstractConnection implements Runnable, Http
if (isFillInterested()) if (isFillInterested())
{ {
LOG.warn("Pending read in onCompleted {} {}", this, getEndPoint()); LOG.warn("Pending read in onCompleted {} {}", this, getEndPoint());
abort(new IllegalStateException()); abort(new IllegalStateException("Pending read in onCompleted"));
} }
// Handle connection upgrades // Handle connection upgrades

View File

@ -56,11 +56,11 @@ import static org.junit.jupiter.api.Assertions.assertTrue;
public class BlockingTest public class BlockingTest
{ {
private Server server; private Server server;
ServerConnector connector; private ServerConnector connector;
private ContextHandler context; private ContextHandler context;
@BeforeEach @BeforeEach
void setUp() public void setUp()
{ {
server = new Server(); server = new Server();
connector = new ServerConnector(server); connector = new ServerConnector(server);
@ -75,7 +75,7 @@ public class BlockingTest
} }
@AfterEach @AfterEach
void tearDown() throws Exception public void tearDown() throws Exception
{ {
server.stop(); server.stop();
} }
@ -142,7 +142,7 @@ public class BlockingTest
int port = connector.getLocalPort(); int port = connector.getLocalPort();
try (Socket socket = new Socket("localhost", port)) try (Socket socket = new Socket("localhost", port))
{ {
socket.setSoTimeout(1000000); socket.setSoTimeout(10000);
OutputStream out = socket.getOutputStream(); OutputStream out = socket.getOutputStream();
out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1)); out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1));
@ -222,7 +222,7 @@ public class BlockingTest
int port = connector.getLocalPort(); int port = connector.getLocalPort();
try (Socket socket = new Socket("localhost", port)) try (Socket socket = new Socket("localhost", port))
{ {
socket.setSoTimeout(1000000); socket.setSoTimeout(10000);
OutputStream out = socket.getOutputStream(); OutputStream out = socket.getOutputStream();
out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1)); out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1));
@ -307,7 +307,7 @@ public class BlockingTest
int port = connector.getLocalPort(); int port = connector.getLocalPort();
try (Socket socket = new Socket("localhost", port)) try (Socket socket = new Socket("localhost", port))
{ {
socket.setSoTimeout(1000000); socket.setSoTimeout(10000);
OutputStream out = socket.getOutputStream(); OutputStream out = socket.getOutputStream();
out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1)); out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1));
@ -388,7 +388,7 @@ public class BlockingTest
int port = connector.getLocalPort(); int port = connector.getLocalPort();
try (Socket socket = new Socket("localhost", port)) try (Socket socket = new Socket("localhost", port))
{ {
socket.setSoTimeout(1000000); socket.setSoTimeout(10000);
OutputStream out = socket.getOutputStream(); OutputStream out = socket.getOutputStream();
out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1)); out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1));
@ -460,7 +460,7 @@ public class BlockingTest
int port = connector.getLocalPort(); int port = connector.getLocalPort();
try (Socket socket = new Socket("localhost", port)) try (Socket socket = new Socket("localhost", port))
{ {
socket.setSoTimeout(1000000); socket.setSoTimeout(10000);
OutputStream out = socket.getOutputStream(); OutputStream out = socket.getOutputStream();
out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1)); out.write(request.toString().getBytes(StandardCharsets.ISO_8859_1));