summaryrefslogtreecommitdiff
path: root/qpid/java/client
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2006-09-26 08:10:01 +0000
committerMartin Ritchie <ritchiem@apache.org>2006-09-26 08:10:01 +0000
commitfc6e203371b3b60f50a7f045d58fbfb43c081490 (patch)
tree9e80eb5ac12c2b35bae228f19cc8332a1e587afa /qpid/java/client
parent39112baa4d7fb28c1833bcc663f532841e120080 (diff)
downloadqpid-python-fc6e203371b3b60f50a7f045d58fbfb43c081490.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@449942 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java21
1 files changed, 10 insertions, 11 deletions
diff --git a/qpid/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java b/qpid/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java
index be8cc3c8e4..ae057c0e82 100644
--- a/qpid/java/client/test/src/org/apache/qpid/ack/DisconnectAndRedeliverTest.java
+++ b/qpid/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);