diff options
| author | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-07-26 14:37:43 +0000 |
|---|---|---|
| committer | Andrew Donald Kennedy <grkvlt@apache.org> | 2010-07-26 14:37:43 +0000 |
| commit | 65b81e721fcbb9e56886e077e79dea3b799e6d08 (patch) | |
| tree | b25ad45b08a8fe98a270a318d70173f11c3b91ec /qpid/java/broker/src/test | |
| parent | 4fc614a8fa13135024c2927e20926a54279cc46e (diff) | |
| download | qpid-python-65b81e721fcbb9e56886e077e79dea3b799e6d08.tar.gz | |
QPID-2659: Add AMQStoreException to message stores
This is a sub-class of AMQInternalException, which encapsulates error code 541,
or INTERNAL_ERROR.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@979315 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/broker/src/test')
4 files changed, 24 insertions, 22 deletions
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/TopicConfigurationTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/TopicConfigurationTest.java index 691d5acfa9..e3b07b072b 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/TopicConfigurationTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/configuration/TopicConfigurationTest.java @@ -22,6 +22,7 @@ package org.apache.qpid.server.configuration; import org.apache.commons.configuration.ConfigurationException; import org.apache.qpid.AMQException; +import org.apache.qpid.AMQInternalException; import org.apache.qpid.AMQSecurityException; import org.apache.qpid.exchange.ExchangeDefaults; import org.apache.qpid.framing.AMQShortString; @@ -54,7 +55,7 @@ public class TopicConfigurationTest extends InternalBrokerBaseCase * @throws ConfigurationException * @throws AMQSecurityException */ - public void testTopicCreation() throws ConfigurationException, AMQSecurityException + public void testTopicCreation() throws ConfigurationException, AMQSecurityException, AMQInternalException { Exchange topicExchange = _virtualHost.getExchangeRegistry().getExchange(ExchangeDefaults.TOPIC_EXCHANGE_NAME); _virtualHost.getBindingFactory().addBinding("stocks.nyse.appl", _queue, topicExchange, null); diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java index d9378a223b..b0a655e8b6 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/SimpleAMQQueueTest.java @@ -21,10 +21,10 @@ package org.apache.qpid.server.queue; */ -import junit.framework.TestCase; import org.apache.commons.configuration.PropertiesConfiguration; import org.apache.qpid.AMQException; +import org.apache.qpid.AMQInternalException; import org.apache.qpid.AMQSecurityException; import org.apache.qpid.exchange.ExchangeDefaults; import org.apache.qpid.framing.AMQShortString; @@ -149,7 +149,7 @@ public class SimpleAMQQueueTest extends InternalBrokerBaseCase assertEquals("Virtual host was wrong", _virtualHost, _queue.getVirtualHost()); } - public void testBinding() throws AMQSecurityException + public void testBinding() throws AMQSecurityException, AMQInternalException { _virtualHost.getBindingFactory().addBinding(String.valueOf(_routingKey), _queue, _exchange, Collections.EMPTY_MAP); diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/store/SkeletonMessageStore.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/store/SkeletonMessageStore.java index 8cbc50ecbe..5ff84557d8 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/store/SkeletonMessageStore.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/store/SkeletonMessageStore.java @@ -22,6 +22,7 @@ package org.apache.qpid.server.store; import org.apache.commons.configuration.Configuration; import org.apache.qpid.AMQException; +import org.apache.qpid.AMQStoreException; import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.FieldTable; import org.apache.qpid.framing.abstraction.ContentChunk; @@ -76,31 +77,31 @@ public class SkeletonMessageStore implements MessageStore { } - public void createExchange(Exchange exchange) throws AMQException + public void createExchange(Exchange exchange) throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } - public void removeExchange(Exchange exchange) throws AMQException + public void removeExchange(Exchange exchange) throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } - public void bindQueue(Exchange exchange, AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQException + public void bindQueue(Exchange exchange, AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } - public void unbindQueue(Exchange exchange, AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQException + public void unbindQueue(Exchange exchange, AMQShortString routingKey, AMQQueue queue, FieldTable args) throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } - public void createQueue(AMQQueue queue) throws AMQException + public void createQueue(AMQQueue queue) throws AMQStoreException { } - public void createQueue(AMQQueue queue, FieldTable arguments) throws AMQException + public void createQueue(AMQQueue queue, FieldTable arguments) throws AMQStoreException { } @@ -161,7 +162,7 @@ public class SkeletonMessageStore implements MessageStore return null; //To change body of implemented methods use File | Settings | File Templates. } - public void removeQueue(final AMQQueue queue) throws AMQException + public void removeQueue(final AMQQueue queue) throws AMQStoreException { } @@ -179,22 +180,22 @@ public class SkeletonMessageStore implements MessageStore return new Transaction() { - public void enqueueMessage(TransactionLogResource queue, Long messageId) throws AMQException + public void enqueueMessage(TransactionLogResource queue, Long messageId) throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } - public void dequeueMessage(TransactionLogResource queue, Long messageId) throws AMQException + public void dequeueMessage(TransactionLogResource queue, Long messageId) throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } - public void commitTran() throws AMQException + public void commitTran() throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } - public StoreFuture commitTranAsync() throws AMQException + public StoreFuture commitTranAsync() throws AMQStoreException { return new StoreFuture() { @@ -210,14 +211,14 @@ public class SkeletonMessageStore implements MessageStore }; } - public void abortTran() throws AMQException + public void abortTran() throws AMQStoreException { //To change body of implemented methods use File | Settings | File Templates. } }; } - public void updateQueue(AMQQueue queue) throws AMQException + public void updateQueue(AMQQueue queue) throws AMQStoreException { } diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java index ab8c1e7c9c..e8d0b99e6e 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java +++ b/qpid/java/broker/src/test/java/org/apache/qpid/server/store/TestableMemoryMessageStore.java @@ -20,7 +20,7 @@ */ package org.apache.qpid.server.store; -import org.apache.qpid.AMQException; +import org.apache.qpid.AMQStoreException; import org.apache.qpid.server.queue.AMQQueue; import org.apache.qpid.server.message.MessageMetaData; import org.apache.qpid.framing.abstraction.ContentChunk; @@ -68,21 +68,21 @@ public class TestableMemoryMessageStore extends MemoryMessageStore private class TestableTransaction implements Transaction { - public void enqueueMessage(TransactionLogResource queue, Long messageId) throws AMQException + public void enqueueMessage(TransactionLogResource queue, Long messageId) throws AMQStoreException { getMessages().put(messageId, (AMQQueue)queue); } - public void dequeueMessage(TransactionLogResource queue, Long messageId) throws AMQException + public void dequeueMessage(TransactionLogResource queue, Long messageId) throws AMQStoreException { getMessages().remove(messageId); } - public void commitTran() throws AMQException + public void commitTran() throws AMQStoreException { } - public StoreFuture commitTranAsync() throws AMQException + public StoreFuture commitTranAsync() throws AMQStoreException { return new StoreFuture() { @@ -98,7 +98,7 @@ public class TestableMemoryMessageStore extends MemoryMessageStore }; } - public void abortTran() throws AMQException + public void abortTran() throws AMQStoreException { } } |
