diff --git a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestLinearBackoffManager.java b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestLinearBackoffManager.java index 45f96ef436..cdf3fd7e4f 100644 --- a/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestLinearBackoffManager.java +++ b/httpclient5/src/test/java/org/apache/hc/client5/http/impl/classic/TestLinearBackoffManager.java @@ -154,7 +154,8 @@ void testSetPerHostConnectionCap() { } - public void probeUpdatesRemainingAttemptsIndirectly() { + @Test + void probeUpdatesRemainingAttemptsIndirectly() { // Set initial max per route connPerRoute.setMaxPerRoute(route, 4); @@ -173,9 +174,10 @@ public void probeUpdatesRemainingAttemptsIndirectly() { // Apply probe once impl.probe(route); - // Manipulate lastRouteProbes to simulate that enough time has passed for the cooldown period + // Manipulate lastRouteProbes and lastRouteBackoffs to simulate that the cooldown period has passed final Map lastRouteProbes = impl.getLastRouteProbes(); lastRouteProbes.put(route, Instant.now().minusMillis(DEFAULT_COOL_DOWN_MS * 2)); + lastRouteBackoffs.put(route, Instant.now().minusMillis(DEFAULT_COOL_DOWN_MS * 2)); // Apply probe once more impl.probe(route);