ignore JmsClientRequestResponseTest until we have qpid/proton libs with appropriate fixes

This commit is contained in:
Dejan Bosanac 2014-05-29 16:32:54 +02:00
parent 9f78f82378
commit e9126f3513
3 changed files with 19 additions and 8 deletions

View File

@ -87,17 +87,18 @@ public class ActiveMQJMSVendor extends JMSVendor {
@Override
public <T extends Destination> T createDestination(String name, Class<T> kind) {
if (kind == Queue.class) {
return kind.cast(new ActiveMQQueue(name));
String destinationName = name.substring(name.lastIndexOf("://") + 3);
if( kind == Queue.class ) {
return kind.cast(new ActiveMQQueue(destinationName));
}
if (kind == Topic.class) {
return kind.cast(new ActiveMQTopic(name));
if( kind == Topic.class ) {
return kind.cast(new ActiveMQTopic(destinationName));
}
if (kind == TemporaryQueue.class) {
return kind.cast(new ActiveMQTempQueue(name));
if( kind == TemporaryQueue.class ) {
return kind.cast(new ActiveMQTempQueue(destinationName));
}
if (kind == TemporaryTopic.class) {
return kind.cast(new ActiveMQTempTopic(name));
if( kind == TemporaryTopic.class ) {
return kind.cast(new ActiveMQTempTopic(destinationName));
}
return kind.cast(ActiveMQDestination.createDestination(name, ActiveMQDestination.QUEUE_TYPE));
}

View File

@ -53,6 +53,7 @@ import org.apache.activemq.command.SessionId;
import org.apache.activemq.command.SessionInfo;
import org.apache.activemq.command.ShutdownInfo;
import org.apache.activemq.command.TransactionInfo;
import org.apache.activemq.command.ActiveMQTempTopic;
import org.apache.activemq.selector.SelectorParser;
import org.apache.activemq.util.IOExceptionSupport;
import org.apache.activemq.util.IdGenerator;
@ -577,6 +578,13 @@ class AmqpProtocolConverter implements IAmqpProtocolConverter {
if (!closed) {
EncodedMessage em = new EncodedMessage(delivery.getMessageFormat(), buffer.data, buffer.offset, buffer.length);
final ActiveMQMessage message = (ActiveMQMessage) getInboundTransformer().transform(em);
// TODO - we need to cast TempTopic to TempQueue as we internally are using temp queues for all dynamic destinations
// we need to figure out how to support both queues and topics
if (message.getJMSReplyTo() != null && message.getJMSReplyTo() instanceof ActiveMQTempTopic) {
ActiveMQTempTopic tempTopic = (ActiveMQTempTopic)message.getJMSReplyTo();
message.setJMSReplyTo(new ActiveMQTempQueue(tempTopic.getPhysicalName()));
}
current = null;
if (destination != null) {

View File

@ -39,12 +39,14 @@ import javax.jms.Topic;
import org.apache.qpid.amqp_1_0.jms.impl.ConnectionFactoryImpl;
import org.junit.After;
import org.junit.Ignore;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TestName;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@Ignore("Until https://issues.apache.org/jira/browse/PROTON-588 and https://issues.apache.org/jira/browse/QPID-5792 are fixed")
public class JmsClientRequestResponseTest extends AmqpTestSupport implements MessageListener {
private static final Logger LOG = LoggerFactory.getLogger(JmsClientRequestResponseTest.class);