diff options
| author | Robert Godfrey <rgodfrey@apache.org> | 2014-02-24 17:22:34 +0000 |
|---|---|---|
| committer | Robert Godfrey <rgodfrey@apache.org> | 2014-02-24 17:22:34 +0000 |
| commit | 7b4074a9037f3e7354323d6eddfc7c76628b9614 (patch) | |
| tree | b75d3c9ab59fd38c1d5c0fb5b4d5d26c9e76515f /qpid/java | |
| parent | 01aabaf74f4a09b04648d71c78254d9d5860d4e8 (diff) | |
| download | qpid-python-7b4074a9037f3e7354323d6eddfc7c76628b9614.tar.gz | |
QPID-5555 : address review comments from Robbie Gemmell
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1571359 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
4 files changed, 6 insertions, 16 deletions
diff --git a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java index b5fdad027d..e3e3719558 100644 --- a/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java +++ b/qpid/java/broker-core/src/main/java/org/apache/qpid/server/virtualhost/AbstractVirtualHost.java @@ -550,13 +550,6 @@ public abstract class AbstractVirtualHost implements VirtualHost, IConnectionReg attributes = new LinkedHashMap<String, Object>(attributes); String queueName = MapValueConverter.getStringAttribute(Queue.NAME, attributes); - boolean autoDelete = MapValueConverter.getEnumAttribute(LifetimePolicy.class, - Queue.LIFETIME_POLICY, - attributes, - LifetimePolicy.PERMANENT) != LifetimePolicy.PERMANENT; - boolean durable = MapValueConverter.getBooleanAttribute(Queue.DURABLE, attributes, false); - ExclusivityPolicy exclusive = MapValueConverter.getEnumAttribute(ExclusivityPolicy.class,Queue.EXCLUSIVE, attributes, ExclusivityPolicy.NONE); - String owner = MapValueConverter.getStringAttribute(Queue.OWNER, attributes, null); synchronized (_queueRegistry) { @@ -567,7 +560,7 @@ public abstract class AbstractVirtualHost implements VirtualHost, IConnectionReg if(!attributes.containsKey(Queue.ID)) { - UUID id = UUIDGenerator.generateExchangeUUID(queueName, getName()); + UUID id = UUIDGenerator.generateQueueUUID(queueName, getName()); while(_queueRegistry.getQueue(id) != null) { id = UUID.randomUUID(); diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java index c9f3aca91f..dcc1837c5b 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/DurableQueueLoggingTest.java @@ -98,7 +98,11 @@ public class DurableQueueLoggingTest extends AbstractTestLogging String clientID = _connection.getClientID(); assertNotNull("clientID should not be null", clientID); - validateQueueProperties(results, false, false, clientID); + // in 0-8/9/9-1 an exclusive queue will be deleted when the connection is closed, so auto-delete is true. + // in 0-10 an exclusive queue outlasts the creating connection and so is not auto-delete + // the queue only has owner as the client-id in 0-8/9/91 where exclusivity is taken to mean exclusive to the + // client-id in perpetuity. For 0-10 exclusive means exclusive to a session. + validateQueueProperties(results, false, !(isBroker010() || _durable), (_durable && !isBroker010()) ? clientID : null); } /** diff --git a/qpid/java/test-profiles/Java010Excludes b/qpid/java/test-profiles/Java010Excludes index cbdb0c1172..46f789c229 100755 --- a/qpid/java/test-profiles/Java010Excludes +++ b/qpid/java/test-profiles/Java010Excludes @@ -35,9 +35,6 @@ org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartsFlowStopped org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartConsumerFlowStarted org.apache.qpid.server.logging.ConsumerLoggingTest#testSubscriptionSuspend org.apache.qpid.server.logging.ChannelLoggingTest#testChannelClosedOnQueueArgumentsMismatch -// 0-10 exclusive queue is session exclusive and not container exclusive (so exclusive owner is not client-id) -org.apache.qpid.server.logging.DurableQueueLoggingTest#testQueueCreateDurableExclusive -org.apache.qpid.server.logging.TransientQueueLoggingTest#testQueueCreateDurableExclusive // 0-10 is not supported by the MethodRegistry org.apache.qpid.test.unit.close.JavaServerCloseRaceConditionTest#* diff --git a/qpid/java/test-profiles/JavaPre010Excludes b/qpid/java/test-profiles/JavaPre010Excludes index ff8bcfca68..b2f96ca279 100644 --- a/qpid/java/test-profiles/JavaPre010Excludes +++ b/qpid/java/test-profiles/JavaPre010Excludes @@ -79,7 +79,3 @@ org.apache.qpid.systest.management.jmx.QueueManagementTest#testAlternateExchange // QPID-3396 org.apache.qpid.test.unit.client.connection.ConnectionTest#testExceptionWhenUserPassIsRequired -// Non durable exclusive queues are exclusive to a connection (and thus auto-delete - or at least -// not permanent), also their owner is not the container (client-id) but the connection -org.apache.qpid.server.logging.TransientQueueLoggingTest#testQueueCreateDurableExclusive - |
