We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b73c7b commit 1127fdfCopy full SHA for 1127fdf
Tests/Store/MongoDbStoreTest.php
@@ -12,6 +12,7 @@
12
namespace Symfony\Component\Lock\Tests\Store;
13
14
use MongoDB\Client;
15
+use MongoDB\Driver\Exception\ConnectionTimeoutException;
16
use Symfony\Component\Lock\Exception\InvalidArgumentException;
17
use Symfony\Component\Lock\Exception\NotSupportedException;
18
use Symfony\Component\Lock\Key;
@@ -30,7 +31,11 @@ class MongoDbStoreTest extends AbstractStoreTest
30
31
public static function setupBeforeClass(): void
32
{
33
$client = self::getMongoClient();
- $client->listDatabases();
34
+ try {
35
+ $client->listDatabases();
36
+ } catch (ConnectionTimeoutException $e) {
37
+ self::markTestSkipped('MongoDB server not found.');
38
+ }
39
}
40
41
private static function getMongoClient(): Client
0 commit comments