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 | 3df586185f199ec7de08f098eef96228702e4a62 (patch) | |
| tree | 5147ead9a8e57a94cc189475cec804151967a06c /qpid/java | |
| parent | cdb47a1edd2d829db5e1b9c4fd6a7db173b074c6 (diff) | |
| download | qpid-python-3df586185f199ec7de08f098eef96228702e4a62.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@950646 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java')
| -rw-r--r-- | qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java b/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java index 393ffdeaac..27891289fb 100644 --- a/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java +++ b/qpid/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(); } |
