Merge pull request #9008 from eclipse/fix/jetty-10-9005-flaky-ConnectionPoolTest

Fixes #9005 - Flaky test ConnectionPoolTest.testConcurrentRequestsAllBlockedOnServer
This commit is contained in:
Joakim Erdfelt 2022-12-06 09:30:20 -06:00 committed by GitHub
commit 486b51ec18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 3 deletions

View File

@ -379,7 +379,7 @@ public class ConnectionPoolTest
@MethodSource("pools")
public void testConcurrentRequestsAllBlockedOnServerWithLargeConnectionPool(ConnectionPoolFactory factory) throws Exception
{
int count = 50;
int count = 10;
testConcurrentRequestsAllBlockedOnServer(factory, count, 2 * count);
}
@ -387,7 +387,7 @@ public class ConnectionPoolTest
@MethodSource("pools")
public void testConcurrentRequestsAllBlockedOnServerWithExactConnectionPool(ConnectionPoolFactory factory) throws Exception
{
int count = 50;
int count = 10;
testConcurrentRequestsAllBlockedOnServer(factory, count, count);
}
@ -441,10 +441,12 @@ public class ConnectionPoolTest
{
if (result.isSucceeded())
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();
assertEquals(1, destinations.size());
// The max duration connection pool aggressively closes expired connections upon release, which interferes with this assertion.