activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1404757 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
Date Thu, 01 Nov 2012 20:45:11 GMT
Author: tabish
Date: Thu Nov  1 20:45:11 2012
New Revision: 1404757

URL: http://svn.apache.org/viewvc?rev=1404757&view=rev
Log:
apply patch for: https://issues.apache.org/jira/browse/AMQ-3930

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java?rev=1404757&r1=1404756&r2=1404757&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/DataFileNotDeletedTest.java
Thu Nov  1 20:45:11 2012
@@ -24,26 +24,32 @@ import javax.jms.MessageConsumer;
 import javax.jms.MessageListener;
 import javax.jms.ObjectMessage;
 import javax.jms.Session;
-import junit.framework.TestCase;
+
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.kaha.impl.async.AsyncDataManager;
 import org.apache.activemq.store.amq.AMQPersistenceAdapter;
 import org.apache.activemq.store.amq.AMQPersistenceAdapterFactory;
+
+import org.junit.*;
+import org.junit.rules.TestName;
+import static org.junit.Assert.assertEquals;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /*
  * see https://issues.apache.org/activemq/browse/AMQ-1926
  */
-public class DataFileNotDeletedTest extends TestCase {
-
+public class DataFileNotDeletedTest {
+    @Rule
+    public TestName testName = new TestName();
     private static final Logger LOG = LoggerFactory.getLogger(DataFileNotDeletedTest.class);
 
     private final CountDownLatch latch = new CountDownLatch(max_messages);
     private final static int max_messages = 600;
     private static int messageCounter;
-    private final String destinationName = getName()+"_Queue";
+    private final String destinationName = testName.getMethodName()+"_Queue";
     private BrokerService broker;
     private Connection receiverConnection;
     private Connection producerConnection;
@@ -53,7 +59,7 @@ public class DataFileNotDeletedTest exte
     AMQPersistenceAdapter persistentAdapter;
     protected static final String payload = new String(new byte[512]);
 
-    @Override
+    @Before
     public void setUp() throws Exception {
         messageCounter = 0;
         startBroker();
@@ -63,17 +69,20 @@ public class DataFileNotDeletedTest exte
         producerConnection.start();
     }
 
-    @Override
+    @After
     public void tearDown() throws Exception {
         receiverConnection.close();
         producerConnection.close();
         broker.stop();
     }
 
+    @Test
     public void testForDataFileNotDeleted() throws Exception {
         doTestForDataFileNotDeleted(false);
     }
 
+    @Ignore(value="See AMQ-3930")
+    @Test
     public void testForDataFileNotDeletedTransacted() throws Exception {
         doTestForDataFileNotDeleted(true);
     }



Mime
View raw message