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

kezhuw pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/curator.git


The following commit(s) were added to refs/heads/master by this push:
     new 712306034 Fix flaky TestReadOnly.testConnectionStateNewClient in 
ZooKeeper 3.9.3 (#1272)
712306034 is described below

commit 712306034789b5be90de62fac9bc8e8e85920286
Author: Kezhu Wang <[email protected]>
AuthorDate: Fri Jul 4 10:59:59 2025 +0800

    Fix flaky TestReadOnly.testConnectionStateNewClient in ZooKeeper 3.9.3 
(#1272)
    
    ZOOKEEPER-4508 reports `SessionExpired` after exhausting session timeout
    in session establishment instead of endless retries. It is easy to get
    in this now with small session timeout.
    
    Besides above, `sessionTimeoutMs` should bigger than `connectionTimeoutMs`,
    while default `Timing::session()` and `Timing::connection()` are `2s` and
    `10s` respectively now.
    
    ```
    // from CuratorZookeeperClient
    
    if (sessionTimeoutMs < connectionTimeoutMs) {
        log.warn(
                "session timeout [{}] is less than connection timeout [{}]", 
sessionTimeoutMs, connectionTimeoutMs);
    }
    ```
---
 curator-test/src/main/java/org/apache/curator/test/Timing.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/curator-test/src/main/java/org/apache/curator/test/Timing.java 
b/curator-test/src/main/java/org/apache/curator/test/Timing.java
index e5d6d3443..0e6e3875b 100644
--- a/curator-test/src/main/java/org/apache/curator/test/Timing.java
+++ b/curator-test/src/main/java/org/apache/curator/test/Timing.java
@@ -33,7 +33,7 @@ public class Timing {
 
     private static final int DEFAULT_SECONDS = 10;
     private static final int DEFAULT_WAITING_MULTIPLE = 5;
-    private static final double SESSION_MULTIPLE = .25;
+    private static final double SESSION_MULTIPLE = 1.5;
 
     /**
      * Use the default base time

Reply via email to