You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2026/05/13 13:15:10 UTC

(pulsar) branch branch-4.2 updated (1259fc1514e -> 4779f261859)

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

lhotari pushed a change to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git


    from 1259fc1514e [fix][test] Reduce flakiness in testLoadBalancerServiceUnitTableViewSyncer (#25638)
     new 235275d1206 [fix][test] Fix flaky testGetExcludedBookiesWithIsolationGroups (#25640)
     new d0d5f52e87c [fix][test] Make NamespacesTest.cleanupAfterMethod tolerant of transient infra failures (#25641)
     new a598969d3a8 [improve][test] Set diskUsageThreshold to 0.999 for tests to effectively disable the check (#25677)
     new 4779f261859 [fix][test] Fix flaky OneWayReplicatorDeduplicationTest.testDeduplication (#25679)

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../IsolatedBookieEnsemblePlacementPolicyTest.java         |  7 +++++++
 .../org/apache/pulsar/broker/admin/NamespacesTest.java     | 14 ++++++++++----
 .../broker/service/OneWayReplicatorDeduplicationTest.java  |  1 +
 .../apache/pulsar/broker/service/SharedPulsarCluster.java  |  2 ++
 4 files changed, 20 insertions(+), 4 deletions(-)


(pulsar) 03/04: [improve][test] Set diskUsageThreshold to 0.999 for tests to effectively disable the check (#25677)

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit a598969d3a82e2ce9f9e5b126aa595075d1fbf05
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Wed May 6 00:22:09 2026 +0300

    [improve][test] Set diskUsageThreshold to 0.999 for tests to effectively disable the check (#25677)
    
    (cherry picked from commit cc78878528a18a620b4118defc367ca2eac783e0)
---
 .../test/java/org/apache/pulsar/broker/service/SharedPulsarCluster.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/SharedPulsarCluster.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/SharedPulsarCluster.java
index a561712b8ca..3d2ab914ed7 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/SharedPulsarCluster.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/SharedPulsarCluster.java
@@ -112,6 +112,8 @@ public class SharedPulsarCluster {
         bkConf.setNumLongPollWorkerThreads(1);
         bkConf.setAllocatorPoolingPolicy(PoolingPolicy.UnpooledHeap);
         bkConf.setLedgerStorageClass("org.apache.bookkeeper.bookie.storage.ldb.DbLedgerStorage");
+        bkConf.setDiskUsageThreshold(0.999F);
+        bkConf.setDiskUsageWarnThreshold(0.99F);
 
         bkCluster = BKCluster.builder()
                 .baseServerConfiguration(bkConf)


(pulsar) 01/04: [fix][test] Fix flaky testGetExcludedBookiesWithIsolationGroups (#25640)

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 235275d1206ddc2bdc006b694023f896724243fd
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Fri May 1 06:09:54 2026 -0700

    [fix][test] Fix flaky testGetExcludedBookiesWithIsolationGroups (#25640)
    
    (cherry picked from commit 6edd35defd2bc78c943b0542b210d394ec3b8690)
---
 .../rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java   | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java b/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java
index 936b04386ff..0dc996c7d7d 100644
--- a/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java
+++ b/pulsar-broker-common/src/test/java/org/apache/pulsar/bookie/rackawareness/IsolatedBookieEnsemblePlacementPolicyTest.java
@@ -751,6 +751,13 @@ public class IsolatedBookieEnsemblePlacementPolicyTest {
                 NullStatsLogger.INSTANCE, BookieSocketAddress.LEGACY_BOOKIEID_RESOLVER);
         isolationPolicy.onClusterChanged(writableBookies, readOnlyBookies);
 
+        // Wait for the async cache load triggered by initialize() to complete; otherwise
+        // getExcludedBookiesWithIsolationGroups returns an empty set when cachedRackConfiguration
+        // is still null. Same pattern used in testBookieInfoChange (#25473).
+        Awaitility.await().atMost(Duration.ofSeconds(5)).untilAsserted(() ->
+                assertNotNull(isolationPolicy.getBookieMappingCache()
+                        .getIfCached(BookieRackAffinityMapping.BOOKIE_INFO_ROOT_PATH)));
+
         /* Test common cases */
         MutablePair<Set<String>, Set<String>> groups = new MutablePair<>();
         groups.setLeft(Sets.newHashSet(isolationGroup1));


(pulsar) 04/04: [fix][test] Fix flaky OneWayReplicatorDeduplicationTest.testDeduplication (#25679)

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit 4779f2618595a5929428a07eaad6f19ad1a9fe02
Author: Praveen Kumar <12...@users.noreply.github.com>
AuthorDate: Wed May 6 17:04:05 2026 +0530

    [fix][test] Fix flaky OneWayReplicatorDeduplicationTest.testDeduplication (#25679)
    
    (cherry picked from commit 9e40b5534dd0166de05db4762265d0d7c05cd4a2)
---
 .../apache/pulsar/broker/service/OneWayReplicatorDeduplicationTest.java  | 1 +
 1 file changed, 1 insertion(+)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorDeduplicationTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorDeduplicationTest.java
index 353d2ab89e2..344279d2537 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorDeduplicationTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/service/OneWayReplicatorDeduplicationTest.java
@@ -114,6 +114,7 @@ public class OneWayReplicatorDeduplicationTest extends OneWayReplicatorTestBase
                                      LocalBookkeeperEnsemble bookkeeperEnsemble, ZookeeperServerTest brokerConfigZk) {
         super.setConfigDefaults(config, clusterName, bookkeeperEnsemble, brokerConfigZk);
         // For check whether deduplication snapshot has done.
+        config.setBrokerDeduplicationSnapshotIntervalSeconds(1);
         config.setBrokerDeduplicationEntriesInterval(10);
         config.setReplicationStartAt("earliest");
         // To cover more cases, write more than one ledger.


(pulsar) 02/04: [fix][test] Make NamespacesTest.cleanupAfterMethod tolerant of transient infra failures (#25641)

Posted by lh...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch branch-4.2
in repository https://gitbox.apache.org/repos/asf/pulsar.git

commit d0d5f52e87cbee71521b343f7d0aa6e8b0e89b7b
Author: Matteo Merli <mm...@apache.org>
AuthorDate: Fri May 1 06:11:51 2026 -0700

    [fix][test] Make NamespacesTest.cleanupAfterMethod tolerant of transient infra failures (#25641)
    
    (cherry picked from commit ee7dc689408386f59c311c1d3f16eb35c793afca)
---
 .../org/apache/pulsar/broker/admin/NamespacesTest.java     | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
index 6ff2d8a8216..16d53b6f96a 100644
--- a/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
+++ b/pulsar-broker/src/test/java/org/apache/pulsar/broker/admin/NamespacesTest.java
@@ -187,12 +187,18 @@ public class NamespacesTest extends MockedPulsarServiceBaseTest {
     }
 
     @AfterMethod(alwaysRun = true)
-    public void cleanupAfterMethod() throws Exception{
-        // cleanup.
+    public void cleanupAfterMethod() {
+        // Best-effort cleanup. Transient infra failures (e.g. ZK session expiry from a
+        // long-running test or GC pause) can make the admin call fail here; log and
+        // continue so the test method's actual result is preserved.
         Set<String> existsNsSetAferSetup = Stream.concat(testLocalNamespaces.stream(), testGlobalNamespaces.stream())
                 .map(Objects::toString).collect(Collectors.toSet());
-        cleanupNamespaceByPredicate(this.testTenant, v -> !existsNsSetAferSetup.contains(v));
-        cleanupNamespaceByPredicate(this.testOtherTenant, v -> !existsNsSetAferSetup.contains(v));
+        try {
+            cleanupNamespaceByPredicate(this.testTenant, v -> !existsNsSetAferSetup.contains(v));
+            cleanupNamespaceByPredicate(this.testOtherTenant, v -> !existsNsSetAferSetup.contains(v));
+        } catch (Exception e) {
+            log.warn("Failed to clean up namespaces after test method", e);
+        }
     }
 
     protected void customizeNewPulsarClientBuilder(ClientBuilder clientBuilder) {