diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2008-09-03 16:26:38 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2008-09-03 16:26:38 +0000 |
| commit | b7c6b894b1a1bebc578a1a478cddda6edc5255ac (patch) | |
| tree | 7ccad027ab317df788d9acb346cd357a2f360b2d /java/broker/src/test | |
| parent | 2c82cdf278c35b61aaab5681f88269e36213a906 (diff) | |
| download | qpid-python-b7c6b894b1a1bebc578a1a478cddda6edc5255ac.tar.gz | |
QPID-1266 : Provided test for new stop() method. Updated RefCountExService to allow retrieval of the referenceCount. Updated AMQQueue to only perform stop() actions once, such as releasing the RefCountExService. Updated instances where new virtualhosts were not added to the VHostRegistry. See supplemental JIRA for removing the need for this.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@691661 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src/test')
3 files changed, 10 insertions, 3 deletions
diff --git a/java/broker/src/test/java/org/apache/qpid/server/exchange/DestWildExchangeTest.java b/java/broker/src/test/java/org/apache/qpid/server/exchange/DestWildExchangeTest.java index a592c9353a..aa25e207a9 100644 --- a/java/broker/src/test/java/org/apache/qpid/server/exchange/DestWildExchangeTest.java +++ b/java/broker/src/test/java/org/apache/qpid/server/exchange/DestWildExchangeTest.java @@ -60,10 +60,15 @@ public class DestWildExchangeTest extends TestCase _protocolSession = new InternalTestProtocolSession(); } + public void tearDown() + { + ApplicationRegistry.remove(1); + } + public void testNoRoute() throws AMQException { - AMQQueue queue = AMQQueueFactory.createAMQQueueImpl(new AMQShortString("a*#b"), false, null, false, _vhost, null); + AMQQueue queue = AMQQueueFactory.createAMQQueueImpl(new AMQShortString("a*#b"), false, null, false, _vhost, null); _exchange.registerQueue(new AMQShortString("a.*.#.b"), queue, null); diff --git a/java/broker/src/test/java/org/apache/qpid/server/store/MessageStoreTest.java b/java/broker/src/test/java/org/apache/qpid/server/store/MessageStoreTest.java index 0524494bfd..dec4de4cc6 100644 --- a/java/broker/src/test/java/org/apache/qpid/server/store/MessageStoreTest.java +++ b/java/broker/src/test/java/org/apache/qpid/server/store/MessageStoreTest.java @@ -102,6 +102,7 @@ public class MessageStoreTest extends TestCase try { _virtualHost = new VirtualHost(virtualHostName, configuration, null); + ApplicationRegistry.getInstance().getVirtualHostRegistry().registerVirtualHost(_virtualHost); } catch (Exception e) { diff --git a/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java b/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java index 67eb180dbf..28eab73995 100644 --- a/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java +++ b/java/broker/src/test/java/org/apache/qpid/server/util/InternalBrokerBaseCase.java @@ -56,7 +56,8 @@ public class InternalBrokerBaseCase extends TestCase super.setUp(); _registry = new TestApplicationRegistry(); ApplicationRegistry.initialise(_registry); - _virtualHost = _registry.getVirtualHostRegistry().getVirtualHost("test"); + _virtualHost = _registry.getVirtualHostRegistry().getVirtualHost("test"); + _messageStore = _virtualHost.getMessageStore(); QUEUE_NAME = new AMQShortString("test"); @@ -80,7 +81,7 @@ public class InternalBrokerBaseCase extends TestCase public void tearDown() throws Exception { - ApplicationRegistry.removeAll(); + ApplicationRegistry.remove(1); super.tearDown(); } |
