This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch branch-4.1 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 93abcc79fca5f41185e91cad6b966fa82c892f69 Author: Dream95 <[email protected]> AuthorDate: Mon Nov 10 20:10:11 2025 +0800 [fix][test] Fix invalid test NonPersistentTopicTest.testProducerRateLimit (#24957) Signed-off-by: Dream95 <[email protected]> (cherry picked from commit 0896c0a5fe23c57179faf8752b416bee5e43b6a2) --- .../java/org/apache/pulsar/client/api/NonPersistentTopicTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java index 6a9fb4b3484..4fb67b4123f 100644 --- a/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java +++ b/pulsar-broker/src/test/java/org/apache/pulsar/client/api/NonPersistentTopicTest.java @@ -380,13 +380,14 @@ public class NonPersistentTopicTest extends ProducerConsumerBase { var producerName = BrokerTestUtil.newUniqueName("testProducerRateLimit"); @Cleanup Producer<byte[]> producer = pulsarClient.newProducer().topic(topic).producerName(producerName).create(); - byte[] msgData = "testData".getBytes(); final int totalProduceMessages = 500; CountDownLatch latch = new CountDownLatch(totalProduceMessages); for (int i = 0; i < totalProduceMessages; i++) { + final int messageIndex = i; executor.submit(() -> { try { - producer.send(msgData); + String message = "my-message-" + messageIndex; + producer.send(message.getBytes()); } catch (Exception e) { log.error("Failed to send message", e); failed.set(true);
