Passed
Branch docker-environment (b360d6)
by Ralf
20:05 queued 07:20
created

SniffingConnectionPoolIntegrationTest   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 10
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 10
rs 10
c 0
b 0
f 0
wmc 1
1
<?php
2
use Elasticsearch\Common\Exceptions\NoNodesAvailableException;
3
use Elasticsearch\ConnectionPool\SniffingConnectionPool;
4
5
/**
6
 * Class SniffingConnectionPoolIntegrationTest
7
 *
8
 * @category   Tests
9
 * @package    Elasticsearch
10
 * @subpackage Tests/SniffingConnectionPoolTest
11
 * @author     Zachary Tong <[email protected]>
12
 * @license    http://www.apache.org/licenses/LICENSE-2.0 Apache2
13
 * @link       http://elasticsearch.org
14
 */
15
class SniffingConnectionPoolIntegrationTest extends \PHPUnit_Framework_TestCase
16
{
17
    public function testSniff() {
18
        $params['connectionPoolClass'] = '\Elasticsearch\ConnectionPool\SniffingConnectionPool';
19
        $params['connectionPoolParams']['sniffingInterval'] = -10;
20
        $params['hosts'] = array ($_SERVER['ES_TEST_HOST']);
21
22
        $client = new \Elasticsearch\Client($params);
23
24
        $client->ping();
25
26
    }
27
}