Skip to content

Commit 3db039b

Browse files
committed
skip test in case of connect exception
1 parent b497e15 commit 3db039b

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

tests/Integration/BoltDriverIntegrationTest.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,13 @@ public function testValidHostname(): void
3838
public function testValidUrl(): void
3939
{
4040
$ip = gethostbyname($this->getUri()->getHost());
41-
$results = BoltDriver::create($this->getUri()->withHost($ip)->__toString())
42-
->createSession()
43-
->run('RETURN 1 AS x');
41+
try {
42+
$results = BoltDriver::create($this->getUri()->withHost($ip)->__toString())
43+
->createSession()
44+
->run('RETURN 1 AS x');
45+
} catch (ConnectException $e) {
46+
$this->markTestSkipped($e->getMessage());
47+
}
4448

4549
self::assertEquals(1, $results->first()->get('x'));
4650
}

0 commit comments

Comments
 (0)