activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject activemq git commit: no jira - fix up contention between rar and test creating the embedded broker - intermittent ci failure
Date Thu, 18 Oct 2018 10:16:46 GMT
Repository: activemq
Updated Branches:
  refs/heads/master 8690436b5 -> b9c8f6228


no jira - fix up contention between rar and test creating the embedded broker - intermittent
ci failure


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

Branch: refs/heads/master
Commit: b9c8f6228c374af9b2a4b20833db7685feb9892d
Parents: 8690436
Author: gtully <gary.tully@gmail.com>
Authored: Thu Oct 18 11:16:32 2018 +0100
Committer: gtully <gary.tully@gmail.com>
Committed: Thu Oct 18 11:16:32 2018 +0100

----------------------------------------------------------------------
 .../apache/activemq/ra/JmsXAQueueTransactionTest.java  | 13 +++++++++----
 .../activemq/ra/JmsXARollback2CxTransactionTest.java   | 10 +++++++++-
 2 files changed, 18 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/b9c8f622/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java
----------------------------------------------------------------------
diff --git a/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java
b/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java
index f417fbb..2800de5 100644
--- a/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java
+++ b/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXAQueueTransactionTest.java
@@ -19,6 +19,7 @@ package org.apache.activemq.ra;
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.net.URI;
 
 import javax.jms.ConnectionFactory;
 import javax.jms.Session;
@@ -30,12 +31,11 @@ import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.ActiveMQPrefetchPolicy;
 import org.apache.activemq.JmsQueueTransactionTest;
+import org.apache.activemq.broker.BrokerFactory;
+import org.apache.activemq.broker.BrokerService;
 
 public class JmsXAQueueTransactionTest extends JmsQueueTransactionTest {
 
-    private static final String KAHADB_DIRECTORY = "target/activemq-data/";
-    private static final String DEFAULT_HOST = "vm://localhost?broker.dataDirectory=" + KAHADB_DIRECTORY;
-
     private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
     private ActiveMQManagedConnectionFactory managedConnectionFactory;
     private XAResource xaResource;
@@ -43,6 +43,11 @@ public class JmsXAQueueTransactionTest extends JmsQueueTransactionTest
{
     private Xid xid;
 
     @Override
+    protected BrokerService createBroker() throws Exception {
+        return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false&useJmx=false"));
+    }
+
+    @Override
     protected void setSessionTransacted() {
         resourceProvider.setTransacted(false);
         resourceProvider.setAckMode(Session.AUTO_ACKNOWLEDGE);
@@ -51,7 +56,7 @@ public class JmsXAQueueTransactionTest extends JmsQueueTransactionTest {
     @Override
     protected ConnectionFactory newConnectionFactory() throws Exception {
         managedConnectionFactory = new ActiveMQManagedConnectionFactory();
-        managedConnectionFactory.setServerUrl(DEFAULT_HOST);
+        managedConnectionFactory.setServerUrl("vm://localhost?create=false&waitForStart=5000");
         managedConnectionFactory.setUserName(org.apache.activemq.ActiveMQConnectionFactory.DEFAULT_USER);
         managedConnectionFactory.setPassword(ActiveMQConnectionFactory.DEFAULT_PASSWORD);
 

http://git-wip-us.apache.org/repos/asf/activemq/blob/b9c8f622/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
----------------------------------------------------------------------
diff --git a/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
b/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
index 732da9e..81a995e 100644
--- a/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
+++ b/activemq-ra/src/test/java/org/apache/activemq/ra/JmsXARollback2CxTransactionTest.java
@@ -19,6 +19,7 @@ package org.apache.activemq.ra;
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.IOException;
+import java.net.URI;
 
 import javax.jms.Connection;
 import javax.jms.ConnectionFactory;
@@ -32,6 +33,8 @@ import org.apache.activemq.ActiveMQConnection;
 import org.apache.activemq.ActiveMQConnectionFactory;
 import org.apache.activemq.ActiveMQPrefetchPolicy;
 import org.apache.activemq.JmsQueueTransactionTest;
+import org.apache.activemq.broker.BrokerFactory;
+import org.apache.activemq.broker.BrokerService;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -39,7 +42,7 @@ public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest
{
 
     protected static final Logger LOG = LoggerFactory.getLogger(JmsXARollback2CxTransactionTest.class);
 
-    private static final String DEFAULT_HOST = "vm://localhost?create=false";
+    private static final String DEFAULT_HOST = "vm://localhost?create=false&waitForStart=5000";
 
     private ManagedConnectionProxy cx2;
     private ConnectionManagerAdapter connectionManager = new ConnectionManagerAdapter();
@@ -49,6 +52,11 @@ public class JmsXARollback2CxTransactionTest extends JmsQueueTransactionTest
{
     private int index = 0;
 
     @Override
+    protected BrokerService createBroker() throws Exception {
+        return BrokerFactory.createBroker(new URI("broker://()/localhost?persistent=false&useJmx=false"));
+    }
+
+    @Override
     protected void setUp() throws Exception {
         LOG.info("Starting ----------------------------> {}", this.getName());
         super.setUp();


Mime
View raw message