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:33:30 UTC

[activemq] branch activemq-5.15.x 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 activemq-5.15.x
in repository https://gitbox.apache.org/repos/asf/activemq.git


The following commit(s) were added to refs/heads/activemq-5.15.x by this push:
     new a320efc  [AMQ-7403] Fix LeaseDatabaseLockerTest unit test (jmock assertion)
a320efc is described below

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

    [AMQ-7403] Fix LeaseDatabaseLockerTest unit test (jmock assertion)
    
    (cherry picked from commit 3cb8fe87ea1e26f64364e47ac25aab4d77aab4da)
---
 .../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);