Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 57106 invoked from network); 27 Aug 2010 08:32:22 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 27 Aug 2010 08:32:22 -0000 Received: (qmail 65517 invoked by uid 500); 27 Aug 2010 08:32:22 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 65452 invoked by uid 500); 27 Aug 2010 08:32:19 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 65442 invoked by uid 99); 27 Aug 2010 08:32:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Aug 2010 08:32:18 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Aug 2010 08:32:18 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A2F2523888FE; Fri, 27 Aug 2010 08:31:00 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r990066 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/config/BrokerPropertiesTest.java Date: Fri, 27 Aug 2010 08:31:00 -0000 To: commits@activemq.apache.org From: gtully@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20100827083100.A2F2523888FE@eris.apache.org> 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(); } }