2018-07-04 23:37:22 +02:00
|
|
|
<?php
|
|
|
|
|
2018-07-05 20:57:31 +02:00
|
|
|
namespace Friendica\Test\src\Core\Lock;
|
2018-07-04 23:37:22 +02:00
|
|
|
|
|
|
|
|
|
|
|
use Friendica\Core\Lock\SemaphoreLockDriver;
|
|
|
|
|
|
|
|
class SemaphoreLockDriverTest extends LockTest
|
|
|
|
{
|
2018-07-05 20:57:31 +02:00
|
|
|
/**
|
|
|
|
* @var \Friendica\Core\Lock\SemaphoreLockDriver
|
|
|
|
*/
|
|
|
|
private $semaphoreLockDriver;
|
|
|
|
|
2018-07-04 23:37:22 +02:00
|
|
|
protected function getInstance()
|
|
|
|
{
|
2018-07-05 20:57:31 +02:00
|
|
|
$this->semaphoreLockDriver = new SemaphoreLockDriver();
|
|
|
|
return $this->semaphoreLockDriver;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function tearDown()
|
|
|
|
{
|
|
|
|
$this->semaphoreLockDriver->releaseAll();
|
|
|
|
parent::tearDown();
|
2018-07-04 23:37:22 +02:00
|
|
|
}
|
2018-07-07 19:46:16 +02:00
|
|
|
|
|
|
|
function testLockTTL()
|
|
|
|
{
|
|
|
|
// Semaphore doesn't work with TTL
|
|
|
|
return true;
|
|
|
|
}
|
2018-07-07 16:15:03 +02:00
|
|
|
}
|