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/09/09 16:40:32 UTC
(pulsar) 04/04: [fix][test][branch-4.x] Explicitly disable memory limit when testing pending-message defaults
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 23543b7077bf198d49782b9985727c66126d32cd
Author: Lari Hotari <lh...@apache.org>
AuthorDate: Wed Sep 9 19:05:07 2026 +0300
[fix][test][branch-4.x] Explicitly disable memory limit when testing pending-message defaults
---
.../java/org/apache/pulsar/testclient/PerformanceProducerTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceProducerTest.java b/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceProducerTest.java
index 6bd9ec532134..c7d531402cf9 100644
--- a/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceProducerTest.java
+++ b/pulsar-testclient/src/test/java/org/apache/pulsar/testclient/PerformanceProducerTest.java
@@ -240,7 +240,7 @@ public class PerformanceProducerTest extends MockedPulsarServiceBaseTest {
}
/**
- * pulsar-perf runs with the client memory limit disabled unless {@code --memory-limit} is given, so
+ * When pulsar-perf runs with the client memory limit disabled using {@code --memory-limit 0},
* the producer's only backpressure is its pending-message queue. Leaving the options unset has to
* leave the client's own defaults in place; passing their unset value of 0 through would read as an
* explicit "no message-count limit" and leave the producer unbounded, which is what exhausts direct
@@ -249,6 +249,7 @@ public class PerformanceProducerTest extends MockedPulsarServiceBaseTest {
@Test(timeOut = 20000)
public void testPendingMessageLimitsAreLeftToTheClientWhenUnset() throws Exception {
PerformanceProducer producer = new PerformanceProducer();
+ producer.memoryLimit = 0;
producer.topics = List.of(testTopic + UUID.randomUUID());
producer.serviceURL = pulsar.getBrokerServiceUrl();