Merge pull request #9008 from eclipse/fix/jetty-10-9005-flaky-ConnectionPoolTest
Fixes #9005 - Flaky test ConnectionPoolTest.testConcurrentRequestsAllBlockedOnServer
This commit is contained in:
commit
486b51ec18
|
@ -379,7 +379,7 @@ public class ConnectionPoolTest
|
||||||
@MethodSource("pools")
|
@MethodSource("pools")
|
||||||
public void testConcurrentRequestsAllBlockedOnServerWithLargeConnectionPool(ConnectionPoolFactory factory) throws Exception
|
public void testConcurrentRequestsAllBlockedOnServerWithLargeConnectionPool(ConnectionPoolFactory factory) throws Exception
|
||||||
{
|
{
|
||||||
int count = 50;
|
int count = 10;
|
||||||
testConcurrentRequestsAllBlockedOnServer(factory, count, 2 * count);
|
testConcurrentRequestsAllBlockedOnServer(factory, count, 2 * count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -387,7 +387,7 @@ public class ConnectionPoolTest
|
||||||
@MethodSource("pools")
|
@MethodSource("pools")
|
||||||
public void testConcurrentRequestsAllBlockedOnServerWithExactConnectionPool(ConnectionPoolFactory factory) throws Exception
|
public void testConcurrentRequestsAllBlockedOnServerWithExactConnectionPool(ConnectionPoolFactory factory) throws Exception
|
||||||
{
|
{
|
||||||
int count = 50;
|
int count = 10;
|
||||||
testConcurrentRequestsAllBlockedOnServer(factory, count, count);
|
testConcurrentRequestsAllBlockedOnServer(factory, count, count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -441,10 +441,12 @@ public class ConnectionPoolTest
|
||||||
{
|
{
|
||||||
if (result.isSucceeded())
|
if (result.isSucceeded())
|
||||||
latch.countDown();
|
latch.countDown();
|
||||||
|
else
|
||||||
|
result.getFailure().printStackTrace();
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
assertTrue(latch.await(5, TimeUnit.SECONDS), "server requests " + barrier.getNumberWaiting() + "<" + count + " - client: " + client.dump());
|
assertTrue(latch.await(15, TimeUnit.SECONDS), "server requests " + barrier.getNumberWaiting() + "<" + count + " - client: " + client.dump());
|
||||||
List<Destination> destinations = client.getDestinations();
|
List<Destination> destinations = client.getDestinations();
|
||||||
assertEquals(1, destinations.size());
|
assertEquals(1, destinations.size());
|
||||||
// The max duration connection pool aggressively closes expired connections upon release, which interferes with this assertion.
|
// The max duration connection pool aggressively closes expired connections upon release, which interferes with this assertion.
|
||||||
|
|
Loading…
Reference in New Issue