summaryrefslogtreecommitdiff
path: root/java/broker/src/test
diff options
context:
space:
mode:
authorRajith Muditha Attapattu <rajith@apache.org>2007-05-02 16:49:03 +0000
committerRajith Muditha Attapattu <rajith@apache.org>2007-05-02 16:49:03 +0000
commitc98198c56248d16465a1871aa11e9c94c0f950db (patch)
tree56272c427e9b36386a94b4f7bdddb402002bd1c0 /java/broker/src/test
parent4fa14823a4110d82c26edcc1aaf0cd9d325a9dd4 (diff)
downloadqpid-python-c98198c56248d16465a1871aa11e9c94c0f950db.tar.gz
I am commiting the patch supplied by Arnaud Simon. This patch contains support for dtx.
Currently there is one test case failing. I will try to fix it, if not Arnuad will provide a patch soon git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@534541 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/broker/src/test')
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java10
-rw-r--r--java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java9
2 files changed, 13 insertions, 6 deletions
diff --git a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java
index a9496d0de1..a7e5c0d1d0 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueAlertTest.java
@@ -19,14 +19,16 @@ package org.apache.qpid.server.queue;
import junit.framework.TestCase;
import org.apache.qpid.AMQException;
-import org.apache.qpid.server.store.MessageStore;
-import org.apache.qpid.server.store.MemoryMessageStore;
+import org.apache.qpid.server.messageStore.MessageStore;
+import org.apache.qpid.server.messageStore.MemoryMessageStore;
import org.apache.qpid.server.store.StoreContext;
import org.apache.qpid.server.virtualhost.VirtualHost;
import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.txn.TransactionalContext;
import org.apache.qpid.server.txn.NonTransactionalContext;
+import org.apache.qpid.server.txn.TransactionManager;
+import org.apache.qpid.server.txn.MemoryTransactionManager;
import org.apache.qpid.server.RequiredDeliveryException;
import org.apache.qpid.server.AMQChannel;
import org.apache.qpid.server.protocol.TestMinaProtocolSession;
@@ -51,6 +53,8 @@ public class AMQQueueAlertTest extends TestCase
private VirtualHost _virtualHost;
private AMQMinaProtocolSession protocolSession = null;
private MessageStore _messageStore = new MemoryMessageStore();
+ private TransactionManager _txm = new MemoryTransactionManager();
+
private StoreContext _storeContext = new StoreContext();
private TransactionalContext _transactionalContext = new NonTransactionalContext(_messageStore, _storeContext,
null,
@@ -170,7 +174,7 @@ public class AMQQueueAlertTest extends TestCase
public void testQueueDepthAlertWithSubscribers() throws Exception
{
protocolSession = new TestMinaProtocolSession();
- AMQChannel channel = new AMQChannel(protocolSession, 2, _messageStore, null);
+ AMQChannel channel = new AMQChannel(protocolSession, 2,_txm, _messageStore, null);
protocolSession.addChannel(channel);
// Create queue
diff --git a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
index 551eb8f0a0..03137c9794 100644
--- a/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
+++ b/java/broker/src/test/java/org/apache/qpid/server/queue/AMQQueueMBeanTest.java
@@ -30,9 +30,11 @@ import org.apache.qpid.server.registry.IApplicationRegistry;
import org.apache.qpid.server.registry.ApplicationRegistry;
import org.apache.qpid.server.txn.TransactionalContext;
import org.apache.qpid.server.txn.NonTransactionalContext;
-import org.apache.qpid.server.store.MessageStore;
+import org.apache.qpid.server.txn.TransactionManager;
+import org.apache.qpid.server.txn.MemoryTransactionManager;
+import org.apache.qpid.server.messageStore.MessageStore;
import org.apache.qpid.server.store.StoreContext;
-import org.apache.qpid.server.store.MemoryMessageStore;
+import org.apache.qpid.server.messageStore.MemoryMessageStore;
import javax.management.JMException;
import java.util.LinkedList;
@@ -47,6 +49,7 @@ public class AMQQueueMBeanTest extends TestCase
private AMQQueue _queue;
private AMQQueueMBean _queueMBean;
private MessageStore _messageStore = new MemoryMessageStore();
+ private TransactionManager _txm = new MemoryTransactionManager();
private StoreContext _storeContext = new StoreContext();
private TransactionalContext _transactionalContext = new NonTransactionalContext(_messageStore, _storeContext,
null,
@@ -80,7 +83,7 @@ public class AMQQueueMBeanTest extends TestCase
TestMinaProtocolSession protocolSession = new TestMinaProtocolSession();
- AMQChannel channel = new AMQChannel(protocolSession, 1, _messageStore, null);
+ AMQChannel channel = new AMQChannel(protocolSession, 1,_txm, _messageStore, null);
protocolSession.addChannel(channel);
_queue.registerProtocolSession(protocolSession, 1, new AMQShortString("test"), false, null,false,false);