Fix Locks

- Wrong return of lock releasing with DBA provider
- It's not possible to maintain Semaphore locks, since they aren't accessible by other processes
Should solve https://github.com/friendica/friendica/issues/7298#issuecomment-521996540
This commit is contained in:
Philipp Holzer
2019-08-17 19:33:36 +02:00
parent e8561b480b
commit c803dcb6c5
4 changed files with 74 additions and 48 deletions

View File

@@ -190,4 +190,13 @@ abstract class LockTest extends MockedTest
$this->assertFalse($this->instance->isLocked('foo'));
$this->assertFalse($this->instance->isLocked('bar'));
}
/**
* Test if releasing a non-existing lock doesn't throw errors
*/
public function testReleaseLockWithoutLock()
{
$this->assertFalse($this->instance->isLocked('wrongLock'));
$this->assertFalse($this->instance->releaseLock('wrongLock'));
}
}