qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rob...@apache.org
Subject [1/3] qpid-jms git commit: add capability to indicate dynamic ndoe type as TemporaryQueue, match on this in tests
Date Mon, 05 Jan 2015 17:35:12 GMT
Repository: qpid-jms
Updated Branches:
  refs/heads/master 372f0f2ee -> 290312885


add capability to indicate dynamic ndoe type as TemporaryQueue, match on this in tests


Project: http://git-wip-us.apache.org/repos/asf/qpid-jms/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-jms/commit/84e89898
Tree: http://git-wip-us.apache.org/repos/asf/qpid-jms/tree/84e89898
Diff: http://git-wip-us.apache.org/repos/asf/qpid-jms/diff/84e89898

Branch: refs/heads/master
Commit: 84e89898283bcacef928a746fecbfc7c2d6de767
Parents: 372f0f2
Author: Robert Gemmell <robbie@apache.org>
Authored: Mon Jan 5 15:42:01 2015 +0000
Committer: Robert Gemmell <robbie@apache.org>
Committed: Mon Jan 5 15:42:01 2015 +0000

----------------------------------------------------------------------
 .../apache/qpid/jms/provider/amqp/AmqpTemporaryDestination.java  | 4 ++++
 .../java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java     | 2 ++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/84e89898/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpTemporaryDestination.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpTemporaryDestination.java
b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpTemporaryDestination.java
index 048a5bc..af78455 100644
--- a/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpTemporaryDestination.java
+++ b/qpid-jms-client/src/main/java/org/apache/qpid/jms/provider/amqp/AmqpTemporaryDestination.java
@@ -48,6 +48,7 @@ import org.slf4j.LoggerFactory;
 public class AmqpTemporaryDestination extends AmqpAbstractResource<JmsDestination, Sender>
{
 
     public static final Symbol DYNAMIC_NODE_LIFETIME_POLICY = Symbol.valueOf("lifetime-policy");
+    public static final Symbol TEMP_QUEUE_CAPABILITY = Symbol.valueOf("temporary-queue");//TODO:
decide location of constant
     private static final String TEMP_QUEUE_CREATOR = "temp-queue-creator:";
     private static final String TEMP_TOPIC_CREATOR = "temp-topic-creator:";
 
@@ -116,6 +117,9 @@ public class AmqpTemporaryDestination extends AmqpAbstractResource<JmsDestinatio
         dynamicNodeProperties.put(DYNAMIC_NODE_LIFETIME_POLICY, DeleteOnClose.getInstance());
         target.setDynamicNodeProperties(dynamicNodeProperties);
 
+        // Set the capability to indicate the node type being created
+        target.setCapabilities(TEMP_QUEUE_CAPABILITY);
+
         Sender sender = session.getProtonSession().sender(senderLinkName);
         sender.setSource(source);
         sender.setTarget(target);

http://git-wip-us.apache.org/repos/asf/qpid-jms/blob/84e89898/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
----------------------------------------------------------------------
diff --git a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
index 9863389..f7498f9 100644
--- a/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
+++ b/qpid-jms-client/src/test/java/org/apache/qpid/jms/test/testpeer/TestAmqpPeer.java
@@ -19,6 +19,7 @@
 package org.apache.qpid.jms.test.testpeer;
 
 import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.arrayContaining;
 import static org.hamcrest.Matchers.equalTo;
 import static org.hamcrest.Matchers.hasEntry;
 import static org.hamcrest.Matchers.instanceOf;
@@ -448,6 +449,7 @@ public class TestAmqpPeer implements AutoCloseable
         targetMatcher.withDurable(equalTo(TerminusDurability.NONE));
         targetMatcher.withExpiryPolicy(equalTo(TerminusExpiryPolicy.LINK_DETACH));
         targetMatcher.withDynamicNodeProperties(hasEntry(equalTo(AmqpTemporaryDestination.DYNAMIC_NODE_LIFETIME_POLICY),
lifetimePolicyMatcher));
+        targetMatcher.withCapabilities(arrayContaining(AmqpTemporaryDestination.TEMP_QUEUE_CAPABILITY));
 
         final AttachMatcher attachMatcher = new AttachMatcher()
                 .withName(notNullValue())


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message