From 08b64b592cb844cbd746b33e5f17c94b2158a115 Mon Sep 17 00:00:00 2001 From: Robert Godfrey Date: Thu, 13 Feb 2014 19:41:22 +0000 Subject: QPID-5551 : replace AMQSecurityException with QpidSecurityException in the broker git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1568015 13f79535-47bb-0310-9956-ffa450edef68 --- .../apache/qpid/server/store/MessageStoreTest.java | 33 ++++++++-------------- 1 file changed, 11 insertions(+), 22 deletions(-) (limited to 'qpid/java/systests') diff --git a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/MessageStoreTest.java b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/MessageStoreTest.java index de36c6e413..bdcdbe23c2 100644 --- a/qpid/java/systests/src/main/java/org/apache/qpid/server/store/MessageStoreTest.java +++ b/qpid/java/systests/src/main/java/org/apache/qpid/server/store/MessageStoreTest.java @@ -51,6 +51,7 @@ import org.apache.qpid.server.queue.PriorityQueue; import org.apache.qpid.server.queue.AMQQueue; import org.apache.qpid.server.queue.ConflationQueue; import org.apache.qpid.server.queue.StandardQueue; +import org.apache.qpid.server.security.QpidSecurityException; import org.apache.qpid.server.txn.AutoCommitTransaction; import org.apache.qpid.server.txn.ServerTransaction; import org.apache.qpid.server.util.BrokerTestHelper; @@ -630,7 +631,7 @@ public class MessageStoreTest extends QpidTestCase } - private void createAllQueues() + private void createAllQueues() throws Exception { //Register Durable Priority Queue createQueue(durablePriorityQueueName, true, true, false, false); @@ -651,7 +652,7 @@ public class MessageStoreTest extends QpidTestCase createQueue(queueName, false, false, false, false); } - private void createAllTopicQueues() + private void createAllTopicQueues() throws Exception { //Register Durable Priority Queue createQueue(durablePriorityTopicQueueName, true, true, false, false); @@ -667,6 +668,7 @@ public class MessageStoreTest extends QpidTestCase } private void createQueue(String queueName, boolean usePriority, boolean durable, boolean exclusive, boolean lastValueQueue) + throws Exception { Map queueArguments = null; @@ -689,22 +691,16 @@ public class MessageStoreTest extends QpidTestCase AMQQueue queue = null; //Ideally we would be able to use the QueueDeclareHandler here. - try - { - queue = getVirtualHost().createQueue(UUIDGenerator.generateRandomUUID(), queueName, durable, queueOwner, false, exclusive, - false, queueArguments); + queue = getVirtualHost().createQueue(UUIDGenerator.generateRandomUUID(), queueName, durable, queueOwner, false, exclusive, + false, queueArguments); + + validateQueueProperties(queue, usePriority, durable, exclusive, lastValueQueue); - validateQueueProperties(queue, usePriority, durable, exclusive, lastValueQueue); - } - catch (AMQException e) - { - fail(e.getMessage()); - } } - private Map createExchanges() + private Map createExchanges() throws Exception { Map exchanges = new HashMap(); @@ -718,18 +714,11 @@ public class MessageStoreTest extends QpidTestCase return exchanges; } - private Exchange createExchange(ExchangeType type, String name, boolean durable) + private Exchange createExchange(ExchangeType type, String name, boolean durable) throws Exception { Exchange exchange = null; - try - { - exchange = getVirtualHost().createExchange(null, name, type.getType(), durable, false, null); - } - catch (AMQException e) - { - fail(e.getMessage()); - } + exchange = getVirtualHost().createExchange(null, name, type.getType(), durable, false, null); return exchange; } -- cgit v1.2.1