Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0d349dd

Browse files
chalasrfabpot
authored andcommitted
[FrameworkBundle] Skip redis cache pools test on failed connection
1 parent c7f1f78 commit 0d349dd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Symfony/Bundle/FrameworkBundle/Tests/Functional/CachePoolsTest.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
use Symfony\Component\Cache\Adapter\FilesystemAdapter;
1515
use Symfony\Component\Cache\Adapter\RedisAdapter;
16+
use Symfony\Component\Cache\Exception\InvalidArgumentException;
1617

1718
class CachePoolsTest extends WebTestCase
1819
{
@@ -33,6 +34,11 @@ public function testRedisCachePools()
3334
throw $e;
3435
}
3536
$this->markTestSkipped($e->getMessage());
37+
} catch (InvalidArgumentException $e) {
38+
if (0 !== strpos($e->getMessage(), 'Redis connection failed')) {
39+
throw $e;
40+
}
41+
$this->markTestSkipped($e->getMessage());
3642
}
3743
}
3844

0 commit comments

Comments
 (0)