Skip to content

Commit 8cd2111

Browse files
committed
Use ping instead of isMaster in Atlas connectivity tests
1 parent 7001387 commit 8cd2111

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/atlas.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ if (getenv('TESTS') !== 'tests/atlas.phpt') { echo "skip Atlas tests not wanted\
1010
<?php
1111
$urls = explode("\n", file_get_contents('.evergreen/atlas-uris.txt'));
1212

13-
$isMasterCmd = new \MongoDB\Driver\Command(['isMaster' => 1]);
13+
$command = new \MongoDB\Driver\Command(['ping' => 1]);
1414
$query = new \MongoDB\Driver\Query([]);
1515

1616
foreach ($urls as $url) {
@@ -21,7 +21,7 @@ foreach ($urls as $url) {
2121

2222
try {
2323
$m = new \MongoDB\Driver\Manager($url);
24-
$m->executeCommand('admin', $isMasterCmd);
24+
$m->executeCommand('admin', $command);
2525
iterator_to_array($m->executeQuery('test.test', $query));
2626
echo "PASS\n";
2727
} catch(Exception $e) {

0 commit comments

Comments
 (0)