diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-23 13:13:54 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2019-11-27 13:34:42 +0100 |
commit | ec14d95292c42ce84320cadcd1b6cf8f5d543131 (patch) | |
tree | 96efab85d8c3a32b8d86d20f9ff7efc1921ba05d /tests/lib/Lock | |
parent | 8d4346d65688d2aabd6e144fe3f3609897a46230 (diff) | |
download | nextcloud-server-ec14d95292c42ce84320cadcd1b6cf8f5d543131.tar.gz nextcloud-server-ec14d95292c42ce84320cadcd1b6cf8f5d543131.zip |
Fix lockprivider test
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'tests/lib/Lock')
-rw-r--r-- | tests/lib/Lock/LockingProvider.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/lib/Lock/LockingProvider.php b/tests/lib/Lock/LockingProvider.php index 7faca3ea90c..75117657bf2 100644 --- a/tests/lib/Lock/LockingProvider.php +++ b/tests/lib/Lock/LockingProvider.php @@ -175,7 +175,10 @@ abstract class LockingProvider extends TestCase { public function testLockedExceptionHasPathForShared() { try { - $this->testSharedLockAfterExclusive(); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); + $this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE)); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); + $this->fail('Expected locked exception'); } catch (LockedException $e) { $this->assertEquals('foo', $e->getPath()); @@ -184,7 +187,10 @@ abstract class LockingProvider extends TestCase { public function testLockedExceptionHasPathForExclusive() { try { - $this->testExclusiveLockAfterShared(); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_EXCLUSIVE); + $this->assertTrue($this->instance->isLocked('foo', ILockingProvider::LOCK_EXCLUSIVE)); + $this->instance->acquireLock('foo', ILockingProvider::LOCK_SHARED); + $this->fail('Expected locked exception'); } catch (LockedException $e) { $this->assertEquals('foo', $e->getPath()); |