activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [1/2] git commit: https://issues.apache.org/jira/browse/AMQ-4606 - remove mysql in favour of derby and defer start in replicated-leveldb b/c spring auto start hides the expected timeout when no zk
Date Tue, 01 Oct 2013 23:31:58 GMT
Updated Branches:
  refs/heads/trunk 5ec5c525d -> 4a01e40cb


https://issues.apache.org/jira/browse/AMQ-4606 - remove mysql in favour of derby and defer
start in replicated-leveldb b/c spring auto start hides the expected timeout when no zk


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/0530aacf
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/0530aacf
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/0530aacf

Branch: refs/heads/trunk
Commit: 0530aacff7a51ce1788d18aecea711efea575df5
Parents: 5ec5c52
Author: gtully <gary.tully@gmail.com>
Authored: Wed Oct 2 00:28:32 2013 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Wed Oct 2 00:28:32 2013 +0100

----------------------------------------------------------------------
 .../sample-conf/activemq-jdbc-performance.xml   |  3 ++-
 .../activemq-leveldb-replicating.xml            |  2 +-
 .../config/BrokerXmlConfigStartTest.java        | 20 ++++++++++++++++----
 3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/0530aacf/assembly/src/sample-conf/activemq-jdbc-performance.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-jdbc-performance.xml b/assembly/src/sample-conf/activemq-jdbc-performance.xml
index 3a3c14e..7ecab37 100644
--- a/assembly/src/sample-conf/activemq-jdbc-performance.xml
+++ b/assembly/src/sample-conf/activemq-jdbc-performance.xml
@@ -58,7 +58,8 @@
         See more database locker options at http://activemq.apache.org/pluggable-storage-lockers.html
     -->
     <persistenceAdapter>
-       <jdbcPersistenceAdapter dataDirectory="${activemq.data}" dataSource="#mysql-ds"
cleanupPeriod="0" />
+       <!--  for mysql-ds below, add attribute: dataSource="#mysql-ds" -->
+       <jdbcPersistenceAdapter dataDirectory="${activemq.data}" cleanupPeriod="0" />
     </persistenceAdapter>
 
     <transportConnectors>

http://git-wip-us.apache.org/repos/asf/activemq/blob/0530aacf/assembly/src/sample-conf/activemq-leveldb-replicating.xml
----------------------------------------------------------------------
diff --git a/assembly/src/sample-conf/activemq-leveldb-replicating.xml b/assembly/src/sample-conf/activemq-leveldb-replicating.xml
index eb7b729..c8a6560 100644
--- a/assembly/src/sample-conf/activemq-leveldb-replicating.xml
+++ b/assembly/src/sample-conf/activemq-leveldb-replicating.xml
@@ -32,7 +32,7 @@
     <!--
         The <broker> element is used to configure the ActiveMQ broker.
     -->
-    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="replicating-broker"
dataDirectory="${activemq.data}">
+    <broker xmlns="http://activemq.apache.org/schema/core" brokerName="replicating-broker"
dataDirectory="${activemq.data}" start="false" >
 
         <!--
             For better performances use VM cursor and small memory limit.

http://git-wip-us.apache.org/repos/asf/activemq/blob/0530aacf/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
index c12da4f..5f83154 100755
--- a/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
+++ b/assembly/src/test/java/org/apache/activemq/config/BrokerXmlConfigStartTest.java
@@ -25,6 +25,7 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Properties;
 import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
 
 import javax.jms.Connection;
 
@@ -51,11 +52,12 @@ public class BrokerXmlConfigStartTest {
     Properties secProps;
 
     private String configUrl;
+    private String shortName;
 
-    @Parameterized.Parameters
+    @Parameterized.Parameters(name = "{1}")
     public static Collection<String[]> getTestParameters() {
         List<String[]> configUrls = new ArrayList<String[]>();
-        configUrls.add(new String[]{"xbean:src/release/conf/activemq.xml"});
+        configUrls.add(new String[]{"xbean:src/release/conf/activemq.xml", "activemq.xml"});
 
         File sampleConfDir = new File("target/conf");
         for (File xmlFile : sampleConfDir.listFiles(new FileFilter() {
@@ -65,15 +67,16 @@ public class BrokerXmlConfigStartTest {
                         pathname.getName().endsWith("xml");
             }})) {
 
-            configUrls.add(new String[]{"xbean:" + sampleConfDir.getAbsolutePath() + "/"
+ xmlFile.getName()});
+            configUrls.add(new String[]{"xbean:" + sampleConfDir.getAbsolutePath() + "/"
+ xmlFile.getName(), xmlFile.getName()});
         }
 
         return configUrls;
     }
 
 
-    public BrokerXmlConfigStartTest(String config) {
+    public BrokerXmlConfigStartTest(String config, String configFileShortName) {
         this.configUrl = config;
+        this.shortName = configFileShortName;
     }
 
     @Test
@@ -82,6 +85,15 @@ public class BrokerXmlConfigStartTest {
         LOG.info("Broker config: " + configUrl);
         System.err.println("Broker config: " + configUrl);
         broker = BrokerFactory.createBroker(configUrl);
+        if ("activemq-leveldb-replicating.xml".equals(shortName)) {
+            try {
+                broker.start();
+            } catch (TimeoutException expectedWithNoZk) {
+                return;
+            }
+        } else {
+            broker.start();
+        }
         // alive, now try connect to connect
         try {
             for (TransportConnector transport : broker.getTransportConnectors()) {


Mime
View raw message