activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r516038 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
Date Thu, 08 Mar 2007 13:28:59 GMT
Author: jstrachan
Date: Thu Mar  8 05:28:58 2007
New Revision: 516038

URL: http://svn.apache.org/viewvc?view=rev&rev=516038
Log:
fix broken test case

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java?view=diff&rev=516038&r1=516037&r2=516038
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/broker/XARecoveryBrokerTest.java
Thu Mar  8 05:28:58 2007
@@ -43,7 +43,7 @@
     
     public void testPreparedTransactionRecoveredOnRestart() throws Exception {
         
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
+        ActiveMQDestination destination = createDestination();
         
         // Setup the producer and send the message.  
         StubConnection connection = createConnection();
@@ -111,7 +111,7 @@
 
     public void testQueuePersistentCommitedMessagesNotLostOnRestart() throws Exception {
         
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
+        ActiveMQDestination destination = createDestination();
         
         // Setup the producer and send the message.  
         StubConnection connection = createConnection();
@@ -158,7 +158,7 @@
     
     public void testQueuePersistentCommitedAcksNotLostOnRestart() throws Exception {
         
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
+        ActiveMQDestination destination = createDestination();
         
         // Setup the producer and send the message.  
         StubConnection connection = createConnection();
@@ -205,13 +205,15 @@
         connection.send(consumerInfo);
 
         // No messages should be delivered.
+        assertNoMessagesLeft(connection);
+
         Message m = receiveMessage(connection);
-        assertNull(m);        
+        assertNull(m);
     }
-    
+
     public void testQueuePersistentUncommittedAcksLostOnRestart() throws Exception {
         
-        ActiveMQDestination destination = new ActiveMQQueue("TEST");
+        ActiveMQDestination destination = createDestination();
         
         // Setup the producer and send the message.  
         StubConnection connection = createConnection();
@@ -273,4 +275,8 @@
         junit.textui.TestRunner.run(suite());
     }
 
+    protected ActiveMQDestination createDestination() {
+        return new ActiveMQQueue(getClass().getName() + "." + getName());
+    }
+    
 }



Mime
View raw message