You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ri...@apache.org on 2010/06/02 18:44:36 UTC
svn commit: r950646 -
/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java
Author: ritchiem
Date: Wed Jun 2 16:44:36 2010
New Revision: 950646
URL: http://svn.apache.org/viewvc?rev=950646&view=rev
Log:
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.
Modified:
qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java
Modified: qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java?rev=950646&r1=950645&r2=950646&view=diff
==============================================================================
--- qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java (original)
+++ qpid/trunk/qpid/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueFactoryTest.java Wed Jun 2 16:44:36 2010
@@ -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();
}
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org