Skip to content

Commit deff694

Browse files
committed
Merged pull request #915
2 parents 41dd0b9 + 1fdb468 commit deff694

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

tests/utils/tools.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,15 @@ function is_mongos($uri)
199199
*/
200200
function is_replica_set($uri)
201201
{
202-
return get_primary_server($uri)->getType() === Server::TYPE_RS_PRIMARY;
202+
if (get_primary_server($uri)->getType() !== Server::TYPE_RS_PRIMARY) {
203+
return false;
204+
}
205+
206+
if (get_uri_option($uri, 'replicaSet') === NULL) {
207+
return false;
208+
}
209+
210+
return true;
203211
}
204212

205213
/**

0 commit comments

Comments
 (0)