You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by jb...@apache.org on 2020/03/11 17:32:56 UTC

[activemq] branch master updated: [AMQ-7403] Fix LeaseDatabaseLockerTest unit test (jmock assertion)

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

jbonofre 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 3cb8fe8  [AMQ-7403] Fix LeaseDatabaseLockerTest unit test (jmock assertion)
     new f7ab720  Merge pull request #509 from jbonofre/AMQ-7403
3cb8fe8 is described below

commit 3cb8fe87ea1e26f64364e47ac25aab4d77aab4da
Author: jbonofre <jb...@apache.org>
AuthorDate: Wed Mar 11 16:59:35 2020 +0100

    [AMQ-7403] Fix LeaseDatabaseLockerTest unit test (jmock assertion)
---
 .../java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java
index 9d69f95..f2a2982 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/store/jdbc/LeaseDatabaseLockerTest.java
@@ -32,7 +32,6 @@ import org.apache.activemq.broker.AbstractLocker;
 import org.apache.activemq.broker.BrokerService;
 import org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter;
 import org.apache.activemq.util.Wait;
-import org.apache.derby.jdbc.EmbeddedDataSource;
 import org.jmock.Expectations;
 import org.jmock.Mockery;
 import org.jmock.lib.legacy.ClassImposteriser;
@@ -261,6 +260,8 @@ public class LeaseDatabaseLockerTest {
             will(returnValue(timestamp));
             allowing(timestamp).getTime();
             will(returnValue(dbTime));
+            allowing(resultSet).close();
+            allowing(preparedStatement).close();
         }});
 
         underTest.configure(jdbcPersistenceAdapter);