You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by rs...@apache.org on 2026/01/15 20:28:10 UTC

(httpcomponents-client) branch master updated: TestLinearBackoffManager: Reduce likelihood of race condition causing test failure

This is an automated email from the ASF dual-hosted git repository.

rschmitt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-client.git


The following commit(s) were added to refs/heads/master by this push:
     new 4e5ad6e29 TestLinearBackoffManager: Reduce likelihood of race condition causing test failure
4e5ad6e29 is described below

commit 4e5ad6e29683a2648ba0a84dcb21519edd265d06
Author: Ryan Schmitt <rs...@apache.org>
AuthorDate: Thu Jan 15 12:25:40 2026 -0800

    TestLinearBackoffManager: Reduce likelihood of race condition causing test failure
---
 .../apache/hc/client5/http/impl/classic/TestLinearBackoffManager.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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 d3a289ede..45f96ef43 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
@@ -79,7 +79,7 @@ void backoffDoesNotAdjustDuringCoolDownPeriod() {
 
         // Manipulate lastRouteBackoffs to simulate that not enough time has passed for the cooldown period
         final Map<HttpRoute, Instant> lastRouteBackoffs = impl.getLastRouteBackoffs();
-        lastRouteBackoffs.put(route, Instant.now().minusMillis(DEFAULT_COOL_DOWN_MS - 1));
+        lastRouteBackoffs.put(route, Instant.now().minusMillis(1));
 
         // Act
         impl.backOff(route);