This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch fix-circuitbreaker-failover-timing in repository https://gitbox.apache.org/repos/asf/cxf.git
commit f956b18af4dc68262b774c3dfb14590dc6e725b7 Author: Guillaume Nodet <[email protected]> AuthorDate: Thu Mar 12 17:46:27 2026 +0100 Fix flaky CircuitBreakerFailoverTest timing issues - Increase server readiness check from 1s (10x100ms) to 10s (50x200ms) to allow sufficient time for server startup in CI environments - Increase circuit breaker timeout sleep from 4s to 6s (double the 3s circuit breaker timeout) to provide adequate margin on slow CI systems Co-Authored-By: Claude Opus 4.6 <[email protected]> --- .../org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java | 4 ++-- .../apache/cxf/systest/jaxrs/failover/CircuitBreakerFailoverTest.java | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java index b2045f0172..610bfbcbc5 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/AbstractFailoverTest.java @@ -63,7 +63,7 @@ public abstract class AbstractFailoverTest extends AbstractBusClientServerTestBa launchServer(Server.class, true)); boolean activeReplica1Started = false; boolean activeReplica2Started = false; - for (int i = 0; i < 10; i++) { + for (int i = 0; i < 50; i++) { if (!activeReplica1Started) { activeReplica1Started = checkReplica(Server.ADDRESS2); } @@ -73,7 +73,7 @@ public abstract class AbstractFailoverTest extends AbstractBusClientServerTestBa if (activeReplica1Started && activeReplica2Started) { break; } - Thread.sleep(100L); + Thread.sleep(200L); } } diff --git a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/CircuitBreakerFailoverTest.java b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/CircuitBreakerFailoverTest.java index edfb589d83..224ca68a31 100644 --- a/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/CircuitBreakerFailoverTest.java +++ b/systests/jaxrs/src/test/java/org/apache/cxf/systest/jaxrs/failover/CircuitBreakerFailoverTest.java @@ -88,7 +88,7 @@ public class CircuitBreakerFailoverTest extends AbstractFailoverTest { } // Let's wait a bit more than circuit breaker timeout - Thread.sleep(4000); + Thread.sleep(6000); } }
