This is an automated email from the ASF dual-hosted git repository.
jbonofre pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq.git
The following commit(s) were added to refs/heads/main by this push:
new ed31052b75 fix(test): set queue prefetch in UsageBlockedDispatchTest
to prevent flaky failure (#1765)
ed31052b75 is described below
commit ed31052b75a017e972067ff8811fc7047f590efc
Author: JB Onofré <[email protected]>
AuthorDate: Wed Mar 18 05:45:12 2026 +0100
fix(test): set queue prefetch in UsageBlockedDispatchTest to prevent flaky
failure (#1765)
The test only set topicPrefetch but uses queues, leaving the default
queue prefetch at 1000. This caused the broker to dispatch many messages
to the consumer's prefetch buffer, freeing enough memory to unblock the
cursor and fail the assertNull check on line 166.
---
.../test/java/org/apache/activemq/usecases/UsageBlockedDispatchTest.java | 1 +
1 file changed, 1 insertion(+)
diff --git
a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/UsageBlockedDispatchTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/UsageBlockedDispatchTest.java
index 29844cfebd..1b3d84886c 100644
---
a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/UsageBlockedDispatchTest.java
+++
b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/UsageBlockedDispatchTest.java
@@ -100,6 +100,7 @@ public class UsageBlockedDispatchTest extends TestSupport {
ActiveMQConnectionFactory factory = new
ActiveMQConnectionFactory(connectionUri);
ActiveMQPrefetchPolicy prefetch = new ActiveMQPrefetchPolicy();
prefetch.setTopicPrefetch(10);
+ prefetch.setQueuePrefetch(1);
factory.setPrefetchPolicy(prefetch);
final Connection producerConnection = factory.createConnection();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact