activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rajdav...@apache.org
Subject svn commit: r905973 - in /activemq/trunk/activemq-core/src/test/java/org/apache/activemq: config/BrokerXmlConfigFromJNDITest.java test/TestSupport.java
Date Wed, 03 Feb 2010 10:23:36 GMT
Author: rajdavies
Date: Wed Feb  3 10:23:34 2010
New Revision: 905973

URL: http://svn.apache.org/viewvc?rev=905973&view=rev
Log:
Applied patcg for https://issues.apache.org/activemq/browse/AMQ-2555

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java?rev=905973&r1=905972&r2=905973&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
(original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerXmlConfigFromJNDITest.java
Wed Feb  3 10:23:34 2010
@@ -30,11 +30,8 @@
  */
 public class BrokerXmlConfigFromJNDITest extends JmsTopicSendReceiveWithTwoConnectionsTest
{
     protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
-        // START SNIPPET: example
+        assertBaseDirectoryContainsSpaces();
 
-        
-//        System.err.print(System.getProperties());
-        
         // we could put these properties into a jndi.properties
         // on the classpath instead
         Hashtable properties = new Hashtable();
@@ -42,7 +39,6 @@
 
         // configure the embedded broker using an XML config file
         // which is either a URL or a resource on the classpath
-        
         File f = new File(System.getProperty("basedir", "."), "/src/test/resources/activemq.xml");
         properties.put(Context.PROVIDER_URL, "vm://localhost?brokerConfig=xbean:" + f.toURI());
 

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java?rev=905973&r1=905972&r2=905973&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/test/TestSupport.java Wed
Feb  3 10:23:34 2010
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.test;
 
+import java.io.File;
 import java.lang.reflect.Array;
 
 import javax.jms.Connection;
@@ -169,6 +170,13 @@
             assertEquals(message, m1, m2);
         }
     }
+    
+    /**
+     * Test if base directory contains spaces
+     */
+    protected void assertBaseDirectoryContainsSpaces() {
+    	assertFalse("Base directory cannot contain spaces.", new File(System.getProperty("basedir",
".")).getAbsoluteFile().toString().contains(" "));
+    }
 
     /**
      * Creates an ActiveMQConnectionFactory.



Mime
View raw message