// ------------------ test the clusterlocker ----------------------
Locker cl = CoordinatorManager.getCoordinator().getLocker();
// acquire
LockResult res1 = cl.acquireLock(ores, ident, "abc");
assertTrue(res1.isSuccess());
DBFactory.getInstance().closeSession();
// reacquire same identity (get from db)
LockResult res11 = cl.acquireLock(ores, ident, "abc");
long lock1Ac = res11.getLockAquiredTime();
assertTrue(res11.isSuccess());
DBFactory.getInstance().closeSession();
// acquire by another identity must fail
LockResult res2 = cl.acquireLock(ores, ident2, "abc");
assertFalse(res2.isSuccess());
DBFactory.getInstance().closeSession();
// reacquire same identity
LockResult res3 = cl.acquireLock(ores, ident, "abc");
assertTrue(res3.isSuccess());
DBFactory.getInstance().closeSession();
// test the admin
List<LockEntry> entries = cl.adminOnlyGetLockEntries();
assertEquals(1, entries.size());