Skip to content

Commit 2d9c915

Browse files
committed
MAGETWO-98151: Add support ZooKeeper and flock locks
1 parent a2ad442 commit 2d9c915

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

dev/tests/integration/testsuite/Magento/Framework/Lock/Backend/FileTest.php renamed to dev/tests/integration/testsuite/Magento/Framework/Lock/Backend/FileLockTest.php

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
/**
1111
* \Magento\Framework\Lock\Backend\File test case
1212
*/
13-
class FileTest extends \PHPUnit\Framework\TestCase
13+
class FileLockTest extends \PHPUnit\Framework\TestCase
1414
{
1515
/**
16-
* @var \Magento\Framework\Lock\Backend\File
16+
* @var \Magento\Framework\Lock\Backend\FileLock
1717
*/
1818
private $model;
1919

@@ -25,7 +25,10 @@ class FileTest extends \PHPUnit\Framework\TestCase
2525
protected function setUp()
2626
{
2727
$this->objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
28-
$this->model = $this->objectManager->create(\Magento\Framework\Lock\Backend\File::class, ['path' => '/tmp']);
28+
$this->model = $this->objectManager->create(
29+
\Magento\Framework\Lock\Backend\FileLock::class,
30+
['path' => '/tmp']
31+
);
2932
}
3033

3134
public function testLockAndUnlock()

lib/internal/Magento/Framework/Lock/Backend/File.php renamed to lib/internal/Magento/Framework/Lock/Backend/FileLock.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
/**
1717
* LockManager using the file system for locks
1818
*/
19-
class File implements LockManagerInterface
19+
class FileLock implements LockManagerInterface
2020
{
2121
/**
2222
* The file driver instance

lib/internal/Magento/Framework/Lock/LockBackendFactory.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
use Magento\Framework\Lock\Backend\Database as DatabaseLock;
1515
use Magento\Framework\Lock\Backend\Zookeeper as ZookeeperLock;
1616
use Magento\Framework\Lock\Backend\Cache as CacheLock;
17-
use Magento\Framework\Lock\Backend\File as FileLock;
17+
use Magento\Framework\Lock\Backend\FileLock;
1818

1919
/**
2020
* The factory to create object that implements LockManagerInterface

lib/internal/Magento/Framework/Lock/Test/Unit/LockBackendFactoryTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
use Magento\Framework\Lock\Backend\Database as DatabaseLock;
1111
use Magento\Framework\Lock\Backend\Zookeeper as ZookeeperLock;
1212
use Magento\Framework\Lock\Backend\Cache as CacheLock;
13-
use Magento\Framework\Lock\Backend\File as FileLock;
13+
use Magento\Framework\Lock\Backend\FileLock;
1414
use Magento\Framework\Lock\LockBackendFactory;
1515
use Magento\Framework\ObjectManagerInterface;
1616
use Magento\Framework\Lock\LockManagerInterface;

0 commit comments

Comments
 (0)