diff --git a/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java b/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java index 3d0d698028..870e9fe302 100644 --- a/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java +++ b/activemq-core/src/test/java/org/apache/activemq/broker/MessageExpirationTest.java @@ -100,7 +100,7 @@ public class MessageExpirationTest extends BrokerTestSupport { destination = createDestinationInfo(connection2, connectionInfo2, destinationType); ConsumerInfo consumerInfo2 = createConsumerInfo(sessionInfo2, destination); consumerInfo2.setPrefetchSize(1); - connection2.send(consumerInfo2); + connection2.request(consumerInfo2); // Reduce the limit so that only 1 message can flow through the broker at a time. broker.getMemoryManager().setLimit(1);