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 2016/05/26 10:31:20 UTC
[1/2] activemq git commit: fix shadowing and ensure close of
connection, ci...
Repository: activemq
Updated Branches:
refs/heads/master 0757cdcd5 -> 29b833fe8
fix shadowing and ensure close of connection, ci...
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/29b833fe
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/29b833fe
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/29b833fe
Branch: refs/heads/master
Commit: 29b833fe8ed87141e4a5870fe3c2377f5107437f
Parents: 62ab556
Author: gtully <ga...@gmail.com>
Authored: Thu May 26 11:30:14 2016 +0100
Committer: gtully <ga...@gmail.com>
Committed: Thu May 26 11:30:32 2016 +0100
----------------------------------------------------------------------
.../java/org/apache/activemq/JmsTransactionTestSupport.java | 5 ++++-
.../src/test/java/org/apache/activemq/test/TestSupport.java | 7 ++++---
2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/29b833fe/activemq-broker/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java b/activemq-broker/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
index 7f212cd..423f1ee 100755
--- a/activemq-broker/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
+++ b/activemq-broker/src/test/java/org/apache/activemq/JmsTransactionTestSupport.java
@@ -49,7 +49,6 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements M
private static final int MESSAGE_COUNT = 5;
private static final String MESSAGE_TEXT = "message";
- protected ConnectionFactory connectionFactory;
protected Connection connection;
protected Session session;
protected MessageConsumer consumer;
@@ -130,6 +129,10 @@ public abstract class JmsTransactionTestSupport extends TestSupport implements M
try {
session.close();
session = null;
+ } catch (Exception e) {
+ LOG.info("Caught exception while closing resources.");
+ }
+ try {
connection.close();
connection = null;
} catch (Exception e) {
http://git-wip-us.apache.org/repos/asf/activemq/blob/29b833fe/activemq-broker/src/test/java/org/apache/activemq/test/TestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/test/java/org/apache/activemq/test/TestSupport.java b/activemq-broker/src/test/java/org/apache/activemq/test/TestSupport.java
index a73bc40..6acb807 100755
--- a/activemq-broker/src/test/java/org/apache/activemq/test/TestSupport.java
+++ b/activemq-broker/src/test/java/org/apache/activemq/test/TestSupport.java
@@ -20,6 +20,7 @@ import java.io.File;
import java.lang.reflect.Array;
import javax.jms.Connection;
+import javax.jms.ConnectionFactory;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
@@ -42,7 +43,7 @@ import org.slf4j.LoggerFactory;
public abstract class TestSupport extends TestCase {
private static final Logger LOG = LoggerFactory.getLogger(TestSupport.class);
- protected ActiveMQConnectionFactory connectionFactory;
+ protected ConnectionFactory connectionFactory;
protected boolean topic = true;
public TestSupport() {
@@ -184,7 +185,7 @@ public abstract class TestSupport extends TestCase {
* @return ActiveMQConnectionFactory
* @throws Exception
*/
- protected ActiveMQConnectionFactory createConnectionFactory() throws Exception {
+ protected ConnectionFactory createConnectionFactory() throws Exception {
return new ActiveMQConnectionFactory("vm://localhost?broker.persistent=false");
}
@@ -204,7 +205,7 @@ public abstract class TestSupport extends TestCase {
* @return connectionFactory
* @throws Exception
*/
- public ActiveMQConnectionFactory getConnectionFactory() throws Exception {
+ public ConnectionFactory getConnectionFactory() throws Exception {
if (connectionFactory == null) {
connectionFactory = createConnectionFactory();
assertTrue("Should have created a connection factory!", connectionFactory != null);
[2/2] activemq git commit: increase the lease to allow kahadb
recovery, ci intermittent failure
Posted by gt...@apache.org.
increase the lease to allow kahadb recovery, ci intermittent failure
Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/62ab5568
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/62ab5568
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/62ab5568
Branch: refs/heads/master
Commit: 62ab55683f6fcb5942af43b84ebeb0365699dd2a
Parents: 0757cdc
Author: gtully <ga...@gmail.com>
Authored: Thu May 26 11:29:34 2016 +0100
Committer: gtully <ga...@gmail.com>
Committed: Thu May 26 11:30:32 2016 +0100
----------------------------------------------------------------------
.../apache/activemq/broker/ft/QueueMasterSlaveTestSupport.java | 2 +-
.../activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq/blob/62ab5568/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestSupport.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestSupport.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestSupport.java
index 570b5f1..ab1f1fa 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestSupport.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/QueueMasterSlaveTestSupport.java
@@ -130,7 +130,7 @@ abstract public class QueueMasterSlaveTestSupport extends JmsTopicSendReceiveWit
MessageConsumer qConsumer = session.createConsumer(new ActiveMQQueue("Consumer.A.VirtualTopic.TA1"));
assertNull("No message there yet", qConsumer.receive(1000));
qConsumer.close();
- assertTrue(!master.isSlave());
+ assertTrue("master is indeed the master", !master.isSlave());
master.stop();
assertTrue("slave started", slaveStarted.await(60, TimeUnit.SECONDS));
assertTrue(!slave.get().isSlave());
http://git-wip-us.apache.org/repos/asf/activemq/blob/62ab5568/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java
index c14506f..89f6f5c 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/kahaDbJdbcLeaseQueueMasterSlaveTest.java
@@ -112,8 +112,8 @@ public class kahaDbJdbcLeaseQueueMasterSlaveTest extends QueueMasterSlaveTestSup
}
protected void configureLocker(KahaDBPersistenceAdapter kahaDBPersistenceAdapter) throws IOException {
- kahaDBPersistenceAdapter.setLockKeepAlivePeriod(500);
- kahaDBPersistenceAdapter.getLocker().setLockAcquireSleepInterval(500);
+ kahaDBPersistenceAdapter.setLockKeepAlivePeriod(2000);
+ kahaDBPersistenceAdapter.getLocker().setLockAcquireSleepInterval(5000);
}
protected DataSource getExistingDataSource() throws Exception {