mirror of https://github.com/apache/activemq.git
no jira - add selector on originalDestination attribute test
This commit is contained in:
parent
a436b2177e
commit
b3386c8ac7
|
@ -21,6 +21,7 @@ import javax.jms.JMSException;
|
||||||
import javax.jms.Message;
|
import javax.jms.Message;
|
||||||
|
|
||||||
import org.apache.activemq.command.ActiveMQMessage;
|
import org.apache.activemq.command.ActiveMQMessage;
|
||||||
|
import org.apache.activemq.command.ActiveMQQueue;
|
||||||
import org.apache.activemq.command.ActiveMQTextMessage;
|
import org.apache.activemq.command.ActiveMQTextMessage;
|
||||||
import org.apache.activemq.command.ActiveMQTopic;
|
import org.apache.activemq.command.ActiveMQTopic;
|
||||||
import org.apache.activemq.filter.BooleanExpression;
|
import org.apache.activemq.filter.BooleanExpression;
|
||||||
|
@ -364,6 +365,15 @@ public class SelectorTest extends TestCase {
|
||||||
assertSelector(message, "REGEX('connection1111', REPLACE(JMSMessageID,':',''))", true);
|
assertSelector(message, "REGEX('connection1111', REPLACE(JMSMessageID,':',''))", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testMatchOriginalDestinationAttribute() throws Exception {
|
||||||
|
|
||||||
|
ActiveMQMessage activeMQMessage = (ActiveMQMessage) createMessage();
|
||||||
|
ActiveMQQueue originalDest = new ActiveMQQueue("QQ");
|
||||||
|
activeMQMessage.setOriginalDestination(originalDest);
|
||||||
|
assertSelector(activeMQMessage, "JMSDestination='" + originalDest.getQualifiedName() +"'", true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
protected Message createMessage() throws JMSException {
|
protected Message createMessage() throws JMSException {
|
||||||
Message message = createMessage("FOO.BAR");
|
Message message = createMessage("FOO.BAR");
|
||||||
message.setJMSType("selector-test");
|
message.setJMSType("selector-test");
|
||||||
|
|
Loading…
Reference in New Issue