diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2010-06-02 16:44:36 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2010-06-02 16:44:36 +0000 |
| commit | 0a3bf38ac2fb5ae5d268f7cfe56765e726758e18 (patch) | |
| tree | d951a3cb8eea0a6d97b6ebb4030af3056e745ff3 /java/broker/src | |
| parent | 998c32694d80a3cd1815c266b9c4a345a2237511 (diff) | |
| download | qpid-python-0a3bf38ac2fb5ae5d268f7cfe56765e726758e18.tar.gz | |
QPID-2632 : Updated as per other tests for IBBC, with setUp/tearDown
This test also required a change to record the number of queues created during IBBC broker startup and ensure the test added one more test.
Previously it checked for 0 queues then 1 queue now it is n and n+1.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@950646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src')
| -rw-r--r-- | java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java index 393ffdeaac..27891289fb 100644 --- a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java +++ b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java @@ -20,32 +20,36 @@ */ package org.apache.qpid.server.queue; -import junit.framework.TestCase; import org.apache.qpid.server.registry.ApplicationRegistry; +import org.apache.qpid.server.util.InternalBrokerBaseCase; import org.apache.qpid.server.virtualhost.VirtualHost; import org.apache.qpid.framing.AMQShortString; import org.apache.qpid.framing.FieldTable; -public class AMQQueueFactoryTest extends TestCase +public class AMQQueueFactoryTest extends InternalBrokerBaseCase { QueueRegistry _queueRegistry; VirtualHost _virtualHost; + int _defaultQueueCount; - public void setUp() + @Override + public void setUp() throws Exception { + super.setUp(); ApplicationRegistry registry = (ApplicationRegistry) ApplicationRegistry.getInstance(); _virtualHost = registry.getVirtualHostRegistry().getVirtualHost("test"); _queueRegistry = _virtualHost.getQueueRegistry(); - assertEquals("Queues registered on an empty virtualhost", 0, _queueRegistry.getQueues().size()); + _defaultQueueCount = _queueRegistry.getQueues().size(); } - public void tearDown() + @Override + public void tearDown() throws Exception { - assertEquals("Queue was not registered in virtualhost", 1, _queueRegistry.getQueues().size()); - ApplicationRegistry.remove(); + assertEquals("Queue was not registered in virtualhost", _defaultQueueCount + 1, _queueRegistry.getQueues().size()); + super.tearDown(); } |
