AMQ-8528: Fix JMS 2.0 related test failures

This commit is contained in:
Christopher L. Shannon (cshannon) 2022-03-08 11:10:16 -05:00
parent db15128b8b
commit 957a2dd940
2 changed files with 11 additions and 10 deletions

View File

@ -28,16 +28,14 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
import javax.jms.CompletionListener;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Session;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQMessageProducer;
import org.apache.activemq.ActiveMQSession;
import org.apache.activemq.AsyncCallback;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.MutableBrokerFilter;
import org.apache.activemq.broker.ProducerBrokerExchange;
@ -124,7 +122,7 @@ public class AMQ5212Test {
}
ActiveMQTextMessage message = new ActiveMQTextMessage();
message.setDestination(dest);
activeMQMessageProducer.send(message, (CompletionListener) null);
activeMQMessageProducer.send(message, (AsyncCallback) null);
// send a duplicate
activeMQConnection.syncSendPacket(message);
@ -165,7 +163,7 @@ public class AMQ5212Test {
ActiveMQMessageProducer activeMQMessageProducer = (ActiveMQMessageProducer) activeMQSession.createProducer(dest);
ActiveMQTextMessage message = new ActiveMQTextMessage();
message.setDestination(dest);
activeMQMessageProducer.send(message, (CompletionListener) null);
activeMQMessageProducer.send(message, (AsyncCallback) null);
// send a duplicate
activeMQConnection.syncSendPacket(message);
@ -210,7 +208,7 @@ public class AMQ5212Test {
ActiveMQMessageProducer activeMQMessageProducer = (ActiveMQMessageProducer) activeMQSession.createProducer(dest);
ActiveMQTextMessage message = new ActiveMQTextMessage();
message.setDestination(dest);
activeMQMessageProducer.send(message, (CompletionListener) null);
activeMQMessageProducer.send(message, (AsyncCallback) null);
// send a duplicate
activeMQConnection.syncSendPacket(message);

View File

@ -20,13 +20,16 @@ import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
import java.util.List;
import javax.jms.*;
import javax.jms.CompletionListener;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.Session;
import org.apache.activemq.ActiveMQConnection;
import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.ActiveMQMessageProducer;
import org.apache.activemq.ActiveMQSession;
import org.apache.activemq.AsyncCallback;
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.broker.region.policy.PolicyEntry;
import org.apache.activemq.broker.region.policy.PolicyMap;
@ -108,7 +111,7 @@ public class AMQ6122Test {
ActiveMQMessageProducer activeMQMessageProducer = (ActiveMQMessageProducer) activeMQSession.createProducer(dest);
ActiveMQTextMessage message = new ActiveMQTextMessage();
message.setDestination(dest);
activeMQMessageProducer.send(message, (CompletionListener) null);
activeMQMessageProducer.send(message, (AsyncCallback) null);
// send a duplicate
activeMQConnection.syncSendPacket(message);