Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ void testSetPerHostConnectionCap() {
}


public void probeUpdatesRemainingAttemptsIndirectly() {
@Test
void probeUpdatesRemainingAttemptsIndirectly() {
// Set initial max per route
connPerRoute.setMaxPerRoute(route, 4);

Expand All @@ -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<HttpRoute, Instant> 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);
Expand Down
Loading