From 33f2a9a6f7907a8feba1214496c1aa6abeb4eaf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Deruss=C3=A9?= Date: Wed, 22 Mar 2017 23:12:48 +0100 Subject: [PATCH] Adjust lock delay to avoid false error tests --- .../Component/Lock/Tests/Store/BlockingStoreTestTrait.php | 4 ++-- src/Symfony/Component/Lock/phpunit.xml.dist | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php b/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php index e48a0fda3e038..1e96b7666f799 100644 --- a/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php +++ b/src/Symfony/Component/Lock/Tests/Store/BlockingStoreTestTrait.php @@ -34,7 +34,7 @@ abstract protected function getStore(); public function testBlockingLocks() { // Amount a microsecond used to order async actions - $clockDelay = 30000; + $clockDelay = 50000; if (PHP_VERSION_ID < 50600 || defined('HHVM_VERSION_ID')) { $this->markTestSkipped('The PHP engine does not keep resource in child forks'); @@ -57,7 +57,7 @@ public function testBlockingLocks() $this->assertSame(0, pcntl_wexitstatus($status2)); $this->assertSame(3, pcntl_wexitstatus($status3)); } else { - usleep(2 * $clockDelay); + usleep(1 * $clockDelay); try { // This call should failed given the lock should already by acquired by the child #1 diff --git a/src/Symfony/Component/Lock/phpunit.xml.dist b/src/Symfony/Component/Lock/phpunit.xml.dist index e884d84d3e033..352a41b2199bc 100644 --- a/src/Symfony/Component/Lock/phpunit.xml.dist +++ b/src/Symfony/Component/Lock/phpunit.xml.dist @@ -8,8 +8,8 @@ > - - + +