summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2011-03-22 01:45:04 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2011-03-22 01:45:04 +0000
commitbebc7425039ee37dfad5631c3d344f298042622b (patch)
tree970615a5362d373ae1a2239ff0934cf4a5bcf4fd /java
parent61e723314a4191f04aac3d0114a1f8a2dc90896d (diff)
downloadqpid-python-bebc7425039ee37dfad5631c3d344f298042622b.tar.gz
QPID-2930
I had checked in an incomplete test case with rev 1082719 I had made certain changes to the test case for testing another potential fix, but forgot to revert it back to the original before committing. Re applied the changes to adequately test the issue. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1084048 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java16
1 files changed, 13 insertions, 3 deletions
diff --git a/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java b/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
index 51274b687d..027e4fb19c 100644
--- a/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
+++ b/java/systests/src/main/java/org/apache/qpid/test/unit/message/JMSPropertiesTest.java
@@ -43,6 +43,8 @@ import javax.jms.Session;
import javax.jms.Topic;
import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Map;
/**
* @author Apache Software Foundation
@@ -176,19 +178,27 @@ public class JMSPropertiesTest extends QpidBrokerTestCase
Session ssn = (AMQSession) con.createSession(false, Session.CLIENT_ACKNOWLEDGE);
con.start();
- Topic topic = ssn.createTopic("amq.direct/test");
+ Topic topic = ssn.createTopic("ADDR:amq.direct/test");
MessageConsumer consumer = ssn.createConsumer(topic);
MessageProducer prod = ssn.createProducer(topic);
- prod.send(ssn.createMessage());
+ Message m = ssn.createMessage();
+ m.setObjectProperty("x-amqp-0-10.routing-key", "routing-key".getBytes());
+ m.setObjectProperty("routing-key", "routing-key");
+ prod.send(m);
Message msg = consumer.receive(1000);
assertNotNull(msg);
Enumeration<String> enu = msg.getPropertyNames();
+ Map<String,String> map = new HashMap<String,String>();
while (enu.hasMoreElements())
- {
+ {
String name = enu.nextElement();
String value = msg.getStringProperty(name);
+ map.put(name, value);
}
+
+ assertFalse("Property 'x-amqp-0-10.routing-key' should have been filtered out",map.containsKey("x-amqp-0-10.routing-key"));
+ assertTrue("Property routing-key should be present",map.containsKey("routing-key"));
}
}