activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1159581 - in /activemq/trunk/activemq-core/src/test/java/org/apache/activemq: ./ test/ usecases/
Date Fri, 19 Aug 2011 10:30:41 GMT
Author: gtully
Date: Fri Aug 19 10:30:41 2011
New Revision: 1159581

URL: http://svn.apache.org/viewvc?rev=1159581&view=rev
Log:
some more autofail support to tests that can block a run

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java?rev=1159581&r1=1159580&r2=1159581&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/JmsQueueSendReceiveTwoConnectionsStartBeforeBrokerTest.java
Fri Aug 19 10:30:41 2011
@@ -59,6 +59,7 @@ public class JmsQueueSendReceiveTwoConne
     }
 
     protected void setUp() throws Exception {
+        setAutoFail(true);
         // now lets asynchronously start a broker
         Thread thread = new Thread() {
             public void run() {

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java?rev=1159581&r1=1159580&r2=1159581&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TestSupport.java Fri Aug
19 10:30:41 2011
@@ -200,4 +200,11 @@ public abstract class TestSupport extend
         return adapter;
     }
 
+    /**
+     * Test if base directory contains spaces
+     */
+    protected void assertBaseDirectoryContainsSpaces() {
+    	assertFalse("Base directory cannot contain spaces.", new File(System.getProperty("basedir",
".")).getAbsoluteFile().toString().contains(" "));
+    }
+
 }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java?rev=1159581&r1=1159580&r2=1159581&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/JmsSendReceiveTestSupport.java
Fri Aug 19 10:30:41 2011
@@ -35,13 +35,14 @@ import javax.jms.TextMessage;
 
 import junit.framework.AssertionFailedError;
 
+import org.apache.activemq.*;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * 
  */
-public abstract class JmsSendReceiveTestSupport extends TestSupport implements MessageListener
{
+public abstract class JmsSendReceiveTestSupport extends org.apache.activemq.TestSupport implements
MessageListener {
     private static final Logger LOG = LoggerFactory.getLogger(JmsSendReceiveTestSupport.class);
 
     protected int messageCount = 100;

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java?rev=1159581&r1=1159580&r2=1159581&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnQueueConsumedMessageUsingActivemqXMLTest.java
Fri Aug 19 10:30:41 2011
@@ -73,20 +73,6 @@ public class PublishOnQueueConsumedMessa
         LOG.info("Broker closed...");
     }
 
-    /*
-    * clean up the journal
-    */
-
-    protected static void recursiveDelete(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        file.delete();
-    }
-
     protected BrokerService createBroker(String resource) throws Exception {
         return createBroker(new ClassPathResource(resource));
     }

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java?rev=1159581&r1=1159580&r2=1159581&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/usecases/PublishOnTopicConsumerMessageUsingActivemqXMLTest.java
Fri Aug 19 10:30:41 2011
@@ -74,20 +74,6 @@ public class PublishOnTopicConsumerMessa
         LOG.info("Broker closed...");
     }
 
-    /*
-    * clean up the journal
-    */
-
-    protected static void recursiveDelete(File file) {
-        if (file.isDirectory()) {
-            File[] files = file.listFiles();
-            for (int i = 0; i < files.length; i++) {
-                recursiveDelete(files[i]);
-            }
-        }
-        file.delete();
-    }
-
     protected BrokerService createBroker(String resource) throws Exception {
         return createBroker(new ClassPathResource(resource));
     }



Mime
View raw message