// Get lock with select for update
lockConnection.beginTransaction();
TestUtils.selectForUpdate(lockConnection).get();
// Do select for update on second connection so we can finalizeClose it and then cancel the finalizeClose
connectionToClose.beginTransaction();
DbFuture<ResultSet> future = TestUtils.selectForUpdate(connectionToClose);
DbSessionFuture<Void> closeFuture = connectionToClose.close(false).addListener(new DbListener<Void>() {
public void onCompletion(DbFuture<Void> future) throws Exception {
logger.debug("testCancelClose: In finalizeClose callback for connectionManager {}", connectionManager);