From 45e7d3a21b4f944df9f2824f58fd135dd326ee59 Mon Sep 17 00:00:00 2001 From: gtully Date: Tue, 1 Oct 2013 13:00:40 +0100 Subject: [PATCH] https://issues.apache.org/jira/browse/AMQ-4365 - fix up LeaseDatabaseLockerTest config, needs a lockable instance --- .../activemq/store/jdbc/LeaseDatabaseLockerTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) 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 be0843927d..b49961123d 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 @@ -70,11 +70,11 @@ public class LeaseDatabaseLockerTest { LeaseDatabaseLocker lockerA = new LeaseDatabaseLocker(); lockerA.setLeaseHolderId("First"); - lockerA.configure(jdbc); + jdbc.setLocker(lockerA); final LeaseDatabaseLocker lockerB = new LeaseDatabaseLocker(); lockerB.setLeaseHolderId("Second"); - lockerB.configure(jdbc); + jdbc.setLocker(lockerB); final AtomicBoolean blocked = new AtomicBoolean(true); final Connection connection = dataSource.getConnection(); @@ -141,11 +141,11 @@ public class LeaseDatabaseLockerTest { final LeaseDatabaseLocker lockerA = new LeaseDatabaseLocker(); lockerA.setLeaseHolderId("A"); - lockerA.configure(jdbc); + jdbc.setLocker(lockerA); final LeaseDatabaseLocker lockerB = new LeaseDatabaseLocker(); lockerB.setLeaseHolderId("B"); - lockerB.configure(jdbc); + jdbc.setLocker(lockerB); final Set lockedSet = new HashSet(); ExecutorService executor = Executors.newCachedThreadPool(); @@ -259,6 +259,7 @@ public class LeaseDatabaseLockerTest { }}); underTest.configure(jdbcPersistenceAdapter); + underTest.setLockable(jdbcPersistenceAdapter); return underTest.determineTimeDifference(connection); }