mirror of
https://github.com/macintoshplus/mongo-php-driver.git
synced 2026-03-25 17:32:28 +01:00
* PHPC-2023: Allow observation of TopologyClosedEvent Observation is only possible for non-persistent clients freed before RSHUTDOWN. This change also allows for reliable testing of ServerClosedEvent. * PHPC-2030: Test observation of commands issued during client destruction Command monitoring events can only be observed for non-persistent clients freed before RSHUTDOWN.
20 lines
465 B
PHP
20 lines
465 B
PHP
--TEST--
|
|
MongoDB\Driver\Server::getLatency() returns null when unset (e.g. load balancer)
|
|
--SKIPIF--
|
|
<?php require __DIR__ . "/../utils/basic-skipif.inc"; ?>
|
|
<?php skip_if_not_load_balanced(); ?>
|
|
--FILE--
|
|
<?php
|
|
require_once __DIR__ . "/../utils/basic.inc";
|
|
|
|
$manager = create_test_manager();
|
|
$server = $manager->selectServer(new MongoDB\Driver\ReadPreference('primary'));
|
|
var_dump($server->getLatency());
|
|
|
|
?>
|
|
===DONE===
|
|
<?php exit(0); ?>
|
|
--EXPECT--
|
|
NULL
|
|
===DONE===
|