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 2019/09/04 16:14:51 UTC

[activemq] branch master updated: no jira - fix intermittent test failure with two derby instanced in play in error

This is an automated email from the ASF dual-hosted git repository.

gtully pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/master by this push:
     new a0f4f1c  no jira - fix intermittent test failure with two derby instanced in play in error
a0f4f1c is described below

commit a0f4f1c93de0b65d0bfb7a4b717923b28db89cd9
Author: gtully <ga...@gmail.com>
AuthorDate: Wed Sep 4 17:14:37 2019 +0100

    no jira - fix intermittent test failure with two derby instanced in play in error
---
 .../java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java     | 2 +-
 .../apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java    | 1 +
 .../test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java | 1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
index c193c46..7389aef 100644
--- a/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
+++ b/activemq-jdbc-store/src/main/java/org/apache/activemq/store/jdbc/JDBCPersistenceAdapter.java
@@ -686,7 +686,7 @@ public class JDBCPersistenceAdapter extends DataSourceServiceSupport implements
                 throw new IOException("isValid(10) failed for: " + connection);
             }
         } catch (SQLException e) {
-            LOG.debug("Could not get JDBC connection for checkpoint: " + e);
+            LOG.debug("Could not get JDBC connection for checkpoint: " + e, e);
             throw IOExceptionSupport.create(e);
         } finally {
             if (connection != null) {
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java
index f2b176d..61a7fc8 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueMasterSlaveTest.java
@@ -45,6 +45,7 @@ public class DbRestartJDBCQueueMasterSlaveTest extends JDBCQueueMasterSlaveTest
             LOG.info("STOPPING DB!@!!!!");
             final EmbeddedDataSource ds = ((SyncCreateDataSource)getExistingDataSource()).getDelegate();
             ds.setShutdownDatabase("shutdown");
+            ds.setCreateDatabase("not_any_more");
             LOG.info("DB STOPPED!@!!!!");
             
             Thread dbRestartThread = new Thread("db-re-start-thread") {
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java
index 6064efb..ab586cf 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/broker/ft/DbRestartJDBCQueueTest.java
@@ -106,6 +106,7 @@ public class DbRestartJDBCQueueTest extends JmsTopicSendReceiveWithTwoConnection
             LOG.info("STOPPING DB!@!!!!");
             final EmbeddedDataSource ds = sharedDs;
             ds.setShutdownDatabase("shutdown");
+            ds.setCreateDatabase("not_any_more");
             try {
                 ds.getConnection();
             } catch (Exception ignored) {