connection = \OC::$server->getDatabaseConnection();
return new \OC\Lock\DBLockingProvider($this->connection, $this->timeFactory, 3600, false);
}
public function testDoubleShared(): void {
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED);
$this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED);
$this->assertEquals(2, $this->getLockValue('foo'));
$this->instance->releaseLock('foo', ILockingProvider::LOCK_SHARED);
$this->assertEquals(1, $this->getLockValue('foo'));
$this->instance->releaseLock('foo', ILockingProvider::LOCK_SHARED);
$this->assertEquals(0, $this->getLockValue('foo'));
}
}
tion value='3rdparty/stable29/sabre-dav-itip-broker'>3rdparty/stable29/sabre-dav-itip-broker
Nextcloud server, a safe home for all your data: https://github.com/nextcloud/server | www-data |
blob: 102b11236be8281b0143ea58f163fa566efd6deb (
plain)