Skip to content

Commit

Permalink
Issue #2796 - Max local stream count exceeded when request fails.
Browse files Browse the repository at this point in the history
Restored smaller maxContentLength to avoid that the test takes
too much time and fails.

Signed-off-by: Simone Bordet <simone.bordet@gmail.com>
  • Loading branch information
sbordet committed Oct 30, 2018
1 parent b70323d commit 31cab3d
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -19,6 +19,7 @@
package org.eclipse.jetty.http.client;

import java.io.IOException;
import java.io.InterruptedIOException;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;
Expand Down Expand Up @@ -199,7 +200,7 @@ private void test(final CountDownLatch latch, final List<String> failures)
// if (!ssl && random.nextInt(100) < 5)
// clientTimeout = random.nextInt(500) + 500;

int maxContentLength = 1024 * 1024;
int maxContentLength = 64 * 1024;
int contentLength = random.nextInt(maxContentLength) + 1;

test(scenario.getScheme(), host, method.asString(), clientClose, serverClose, clientTimeout, contentLength, true, latch, failures);
Expand Down Expand Up @@ -336,14 +337,15 @@ public void handle(String target, org.eclipse.jetty.server.Request baseRequest,
response.setHeader("Connection", "close");
}

private void sleep(long time)
private void sleep(long time) throws InterruptedIOException
{
try
{
Thread.sleep(time);
}
catch (InterruptedException ignored)
catch (InterruptedException x)
{
throw new InterruptedIOException();
}
}
}
Expand Down

0 comments on commit 31cab3d

Please sign in to comment.