mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-4365 - fix up LeaseDatabaseLockerTest config, needs a lockable instance
This commit is contained in:
parent
2a5ad365d7
commit
45e7d3a21b
|
@ -70,11 +70,11 @@ public class LeaseDatabaseLockerTest {
|
||||||
|
|
||||||
LeaseDatabaseLocker lockerA = new LeaseDatabaseLocker();
|
LeaseDatabaseLocker lockerA = new LeaseDatabaseLocker();
|
||||||
lockerA.setLeaseHolderId("First");
|
lockerA.setLeaseHolderId("First");
|
||||||
lockerA.configure(jdbc);
|
jdbc.setLocker(lockerA);
|
||||||
|
|
||||||
final LeaseDatabaseLocker lockerB = new LeaseDatabaseLocker();
|
final LeaseDatabaseLocker lockerB = new LeaseDatabaseLocker();
|
||||||
lockerB.setLeaseHolderId("Second");
|
lockerB.setLeaseHolderId("Second");
|
||||||
lockerB.configure(jdbc);
|
jdbc.setLocker(lockerB);
|
||||||
final AtomicBoolean blocked = new AtomicBoolean(true);
|
final AtomicBoolean blocked = new AtomicBoolean(true);
|
||||||
|
|
||||||
final Connection connection = dataSource.getConnection();
|
final Connection connection = dataSource.getConnection();
|
||||||
|
@ -141,11 +141,11 @@ public class LeaseDatabaseLockerTest {
|
||||||
|
|
||||||
final LeaseDatabaseLocker lockerA = new LeaseDatabaseLocker();
|
final LeaseDatabaseLocker lockerA = new LeaseDatabaseLocker();
|
||||||
lockerA.setLeaseHolderId("A");
|
lockerA.setLeaseHolderId("A");
|
||||||
lockerA.configure(jdbc);
|
jdbc.setLocker(lockerA);
|
||||||
|
|
||||||
final LeaseDatabaseLocker lockerB = new LeaseDatabaseLocker();
|
final LeaseDatabaseLocker lockerB = new LeaseDatabaseLocker();
|
||||||
lockerB.setLeaseHolderId("B");
|
lockerB.setLeaseHolderId("B");
|
||||||
lockerB.configure(jdbc);
|
jdbc.setLocker(lockerB);
|
||||||
|
|
||||||
final Set<LeaseDatabaseLocker> lockedSet = new HashSet<LeaseDatabaseLocker>();
|
final Set<LeaseDatabaseLocker> lockedSet = new HashSet<LeaseDatabaseLocker>();
|
||||||
ExecutorService executor = Executors.newCachedThreadPool();
|
ExecutorService executor = Executors.newCachedThreadPool();
|
||||||
|
@ -259,6 +259,7 @@ public class LeaseDatabaseLockerTest {
|
||||||
}});
|
}});
|
||||||
|
|
||||||
underTest.configure(jdbcPersistenceAdapter);
|
underTest.configure(jdbcPersistenceAdapter);
|
||||||
|
underTest.setLockable(jdbcPersistenceAdapter);
|
||||||
return underTest.determineTimeDifference(connection);
|
return underTest.determineTimeDifference(connection);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue