diff options
author | Martin Ritchie <ritchiem@apache.org> | 2006-09-26 08:10:01 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2006-09-26 08:10:01 +0000 |
commit | 6ce702dfb4ea0e1835804efd328be2eee79e23b3 (patch) | |
tree | f94d94c3a3501c4afa9511eb864295503c2bc6d5 /java/client/test/src | |
parent | 78ea0dff2fd4876e130ccc351700b4e95ce330a5 (diff) | |
download | qpid-python-6ce702dfb4ea0e1835804efd328be2eee79e23b3.tar.gz |
Changed default instance id to 1 to make getInstance simpler.
Added ability to specify default ApplicationRegistry
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@449942 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/test/src')
-rw-r--r-- | java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java b/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java index be8cc3c8e4..ae057c0e82 100644 --- a/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java +++ b/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java @@ -24,8 +24,8 @@ import org.apache.qpid.client.AMQConnection; import org.apache.qpid.client.AMQQueue; import org.apache.qpid.client.transport.TransportConnection; import org.apache.qpid.server.registry.ApplicationRegistry; -import org.apache.qpid.server.util.TestApplicationRegistry; import org.apache.qpid.server.store.TestableMemoryMessageStore; +import org.apache.qpid.server.util.TestApplicationRegistry; import org.junit.After; import org.junit.Assert; import org.junit.Before; @@ -40,22 +40,21 @@ public class DisconnectAndRedeliverTest static { //DOMConfigurator.configure("../etc/log4j.xml"); - DOMConfigurator.configure("broker/etc/log4j.xml"); + DOMConfigurator.configure("broker/etc/log4j.xml"); } - @After - public void stopVmBroker() + @Before + public void resetAppliactionRegistry() throws Exception { - TransportConnection.killVMBroker(1); + ApplicationRegistry.initialise(new TestApplicationRegistry()); } - @Before - public void configureApplicationRegistry() throws Exception + @After + public void stopVmBroker() { - ApplicationRegistry.initialise(new TestApplicationRegistry(), 1); + TransportConnection.killVMBroker(1); } - /** * This tests that when there are unacknowledged messages on a channel they are requeued for delivery when * the channel is closed. @@ -67,7 +66,7 @@ public class DisconnectAndRedeliverTest { Connection con = new AMQConnection("vm://:1", "guest", "guest", "consumer1", "/test"); - TestableMemoryMessageStore store = (TestableMemoryMessageStore) ApplicationRegistry.getInstance(1).getMessageStore(); + TestableMemoryMessageStore store = (TestableMemoryMessageStore) ApplicationRegistry.getInstance().getMessageStore(); Session consumerSession = con.createSession(false, Session.CLIENT_ACKNOWLEDGE); AMQQueue queue = new AMQQueue("someQ", "someQ", false, false); @@ -154,7 +153,7 @@ public class DisconnectAndRedeliverTest { Connection con = new AMQConnection("vm://:1", "guest", "guest", "consumer1", "/test"); - TestableMemoryMessageStore store = (TestableMemoryMessageStore) ApplicationRegistry.getInstance(1).getMessageStore(); + TestableMemoryMessageStore store = (TestableMemoryMessageStore) ApplicationRegistry.getInstance().getMessageStore(); Session consumerSession = con.createSession(false, Session.CLIENT_ACKNOWLEDGE); Queue queue = new AMQQueue("someQ", "someQ", false, true); MessageConsumer consumer = consumerSession.createConsumer(queue); |