Skip to content

Commit 985a69f

Browse files
committed
Merge branch 'v1.5'
2 parents 186c06d + deff694 commit 985a69f

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
@@ -211,7 +211,15 @@ function is_mongos($uri)
211211
*/
212212
function is_replica_set($uri)
213213
{
214-
return get_primary_server($uri)->getType() === Server::TYPE_RS_PRIMARY;
214+
if (get_primary_server($uri)->getType() !== Server::TYPE_RS_PRIMARY) {
215+
return false;
216+
}
217+
218+
if (get_uri_option($uri, 'replicaSet') === NULL) {
219+
return false;
220+
}
221+
222+
return true;
215223
}
216224

217225
/**

0 commit comments

Comments
 (0)