Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 02558a5

Browse filesBrowse files
committed
[Lock] Use distinct store for forked processes
1 parent 828ac17 commit 02558a5
Copy full SHA for 02558a5

File tree

1 file changed

+4
-2
lines changed
Filter options

1 file changed

+4
-2
lines changed

‎src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ trait BlockingStoreTestTrait
2222
{
2323
/**
2424
* @see AbstractStoreTest::getStore()
25+
* @return StoreInterface
2526
*/
2627
abstract protected function getStore();
2728

@@ -38,8 +39,6 @@ public function testBlockingLocks()
3839
// Amount a microsecond used to order async actions
3940
$clockDelay = 50000;
4041

41-
/** @var StoreInterface $store */
42-
$store = $this->getStore();
4342
$key = new Key(uniqid(__METHOD__, true));
4443
$parentPID = posix_getpid();
4544

@@ -50,6 +49,7 @@ public function testBlockingLocks()
5049
// Wait the start of the child
5150
pcntl_sigwaitinfo(array(SIGHUP), $info);
5251

52+
$store = $this->getStore();
5353
try {
5454
// This call should failed given the lock should already by acquired by the child
5555
$store->save($key);
@@ -71,6 +71,8 @@ public function testBlockingLocks()
7171
} else {
7272
// Block SIGHUP signal
7373
pcntl_sigprocmask(SIG_BLOCK, array(SIGHUP));
74+
75+
$store = $this->getStore();
7476
try {
7577
$store->save($key);
7678
// send the ready signal to the parent

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.