/**
  * test lock release
  */
 public function testReleaseLock()
 {
     $this->testLock();
     Tinebase_Lock::releaseDBSessionLock($this->_testLockId);
     $aquireLock = Tinebase_Lock::aquireDBSessionLock($this->_testLockId);
     $this->assertTrue($aquireLock, 'lock should be available again');
 }
 /**
  * aquire a lock to prevent parallel execution in a multi server environment
  *
  * @param string $id
  * @return bool
  */
 protected function _aquireMultiServerLock($id)
 {
     $result = Tinebase_Lock::aquireDBSessionLock($id);
     if (true === $result || null === $result) {
         return true;
     }
     return false;
 }
 /**
  * test lock release
  */
 public function testReleaseLock()
 {
     if ($this->_dbIsPgsql()) {
         $this->markTestSkipped('0011692: Tinebase_LockTest with pgsql');
     }
     $this->testLock();
     Tinebase_Lock::releaseDBSessionLock($this->_testLockId);
     $aquireLock = Tinebase_Lock::aquireDBSessionLock($this->_testLockId);
     $this->assertTrue($aquireLock, 'lock should be available again');
 }
 /**
  * release db locks
  */
 protected function _releaseDBLocks()
 {
     foreach ($this->_releaseDBLockIds as $lockId) {
         Tinebase_Lock::releaseDBSessionLock($lockId);
     }
     $this->_releaseDBLockIds = array();
 }