#10543 handle review comments

Signed-off-by: Ludovic Orban <lorban@bitronix.be>
This commit is contained in:
Ludovic Orban 2023-09-22 10:43:19 +02:00
parent 1286f91b1c
commit b25dc8183b
1 changed files with 4 additions and 1 deletions

View File

@ -1201,13 +1201,14 @@ public class HttpClientStreamTest extends AbstractTest
@ParameterizedTest
@MethodSource("transports")
@Tag("DisableLeakTracking:server")
public void testUploadWithRetainedData(Transport transport) throws Exception
public void testHttpStreamConsumeAvailableUponClientTimeout(Transport transport) throws Exception
{
start(transport, new Handler.Abstract()
{
@Override
public boolean handle(Request request, org.eclipse.jetty.server.Response response, Callback callback)
{
// Consume the uploaded data very slowly to make the client timeout.
new Runnable()
{
@Override
@ -1251,6 +1252,8 @@ public class HttpClientStreamTest extends AbstractTest
}
});
// Upload a large amount of data to the server with a timeout small enough
// that the client will timeout during the transfer.
byte[] data = new byte[16 * 1024 * 1024];
new Random().nextBytes(data);
ByteBufferRequestContent content = new ByteBufferRequestContent(ByteBuffer.wrap(data));