File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
lib/internal/Magento/Framework/Lock Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ public function create(): LockManagerInterface
84
84
throw new RuntimeException (new Phrase ('Unknown locks provider. ' ));
85
85
}
86
86
87
+ if (self ::LOCK_ZOOKEEPER === $ provider && !extension_loaded (self ::LOCK_ZOOKEEPER )) {
88
+ throw new RuntimeException (new Phrase ('php extension Zookeeper is not installed. ' ));
89
+ }
90
+
87
91
return $ this ->objectManager ->create ($ this ->lockers [$ provider ], $ config );
88
92
}
89
93
}
Original file line number Diff line number Diff line change @@ -38,6 +38,9 @@ class ZookeeperTest extends TestCase
38
38
*/
39
39
protected function setUp ()
40
40
{
41
+ if (!extension_loaded ('zookeeper ' )) {
42
+ $ this ->markTestSkipped ('Test was skipped because php extension Zookeeper is not installed. ' );
43
+ }
41
44
$ this ->zookeeperProvider = new ZookeeperProvider ($ this ->host , '/some/path/ ' );
42
45
}
43
46
@@ -49,6 +52,4 @@ public function testConstructionWithException()
49
52
{
50
53
$ this ->zookeeperProvider = new ZookeeperProvider ('some host ' , '' );
51
54
}
52
-
53
-
54
55
}
You can’t perform that action at this time.
0 commit comments