Skip to content

Commit 55fa170

Browse files
committed
Fixed script for testing cluster alive
1 parent 8b00aae commit 55fa170

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

util/EnsureClusterAlive.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22

33
declare(strict_types = 1);
44

5+
use Elasticsearch\ClientBuilder;
6+
use Elasticsearch\Tests\Utility;
7+
58
error_reporting(E_ALL | E_STRICT);
69

710
// Set the default timezone. While this doesn't cause any tests to fail, PHP
@@ -17,8 +20,8 @@
1720
// Include the composer autoloader
1821
$autoloader = require_once dirname(__DIR__) . '/vendor/autoload.php';
1922

20-
$client = \Elasticsearch\ClientBuilder::fromConfig([
21-
'hosts' => [$_SERVER['ES_TEST_HOST']]
23+
$client = ClientBuilder::fromConfig([
24+
'hosts' => [Utility::getHost()]
2225
]);
2326

2427
$count = 0;

0 commit comments

Comments
 (0)