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

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


The following commit(s) were added to refs/heads/master by this push:
     new 5b4deb9fd33 [fix][test] Absorb Backoff jitter in 
PulsarServiceNameResolverTest.testRemoveUnavailableHost (#25714)
5b4deb9fd33 is described below

commit 5b4deb9fd3346e9e0807ce7d9430210afb12743d
Author: Matteo Merli <[email protected]>
AuthorDate: Fri May 8 10:08:58 2026 -0700

    [fix][test] Absorb Backoff jitter in 
PulsarServiceNameResolverTest.testRemoveUnavailableHost (#25714)
---
 .../apache/pulsar/client/impl/PulsarServiceNameResolverTest.java    | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/PulsarServiceNameResolverTest.java
 
b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/PulsarServiceNameResolverTest.java
index 4f62d6bc2ea..f43bf0a901b 100644
--- 
a/pulsar-client/src/test/java/org/apache/pulsar/client/impl/PulsarServiceNameResolverTest.java
+++ 
b/pulsar-client/src/test/java/org/apache/pulsar/client/impl/PulsarServiceNameResolverTest.java
@@ -161,8 +161,10 @@ public class PulsarServiceNameResolverTest {
             assertTrue(expectedHostUrls.contains(uri));
         }
 
-        // After backoff time, host1 should be recovery from the unavailable 
hosts
-        Uninterruptibles.sleepUninterruptibly(INIT_QUARANTINE_TIME_MS, 
java.util.concurrent.TimeUnit.MILLISECONDS);
+        // After backoff time, host1 should be recovery from the unavailable 
hosts.
+        // Sleep slightly longer than the configured init duration to absorb 
the Backoff jitter (±5%).
+        Uninterruptibles.sleepUninterruptibly(INIT_QUARANTINE_TIME_MS + 200,
+                java.util.concurrent.TimeUnit.MILLISECONDS);
         // trigger the recovery of host1
         
resolver.markHostAvailability(InetSocketAddress.createUnresolved("host2", 
6651), true);
 

Reply via email to