You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2010/08/27 10:31:00 UTC
svn commit: r990066 -
/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java
Author: gtully
Date: Fri Aug 27 08:31:00 2010
New Revision: 990066
URL: http://svn.apache.org/viewvc?rev=990066&view=rev
Log:
add simple vm properties test
Modified:
activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java
Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java?rev=990066&r1=990065&r2=990066&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java Fri Aug 27 08:31:00 2010
@@ -16,8 +16,11 @@
*/
package org.apache.activemq.config;
+import javax.jms.Connection;
import junit.framework.TestCase;
+import org.apache.activemq.ActiveMQConnectionFactory;
import org.apache.activemq.broker.BrokerFactory;
+import org.apache.activemq.broker.BrokerRegistry;
import org.apache.activemq.broker.BrokerService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -37,5 +40,21 @@ public class BrokerPropertiesTest extend
assertEquals("isUseJmx()", false, broker.isUseJmx());
assertEquals("isPersistent()", false, broker.isPersistent());
assertEquals("getBrokerName()", "Cheese", broker.getBrokerName());
+ broker.stop();
+ }
+
+
+ public void testVmBrokerPropertiesFile() throws Exception {
+ ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("vm://localhost?brokerConfig=properties:org/apache/activemq/config/broker.properties");
+ Connection connection = factory.createConnection();
+ BrokerService broker = BrokerRegistry.getInstance().lookup("Cheese");
+ LOG.info("Found broker : " + broker);
+ assertNotNull(broker);
+
+ assertEquals("isUseJmx()", false, broker.isUseJmx());
+ assertEquals("isPersistent()", false, broker.isPersistent());
+ assertEquals("getBrokerName()", "Cheese", broker.getBrokerName());
+ connection.close();
+ broker.stop();
}
}