Skip to content

Commit a493b21

Browse files
committed
Empty query results should still pass "find" phase in mo-tests
Some of the mo-tests issue find ops after restarting nodes, just as a test that a node is available to service the query. Simply testing that an exception is not thrown is suffcient.
1 parent ceaff59 commit a493b21

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

scripts/convert-mo-tests.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -264,11 +264,7 @@ function clientOperation($phase, &$output) {
264264
try {
265265
\$query = new MongoDB\\Driver\\Query(array());
266266
\$result = \$manager->executeQuery("databaseName.collectionName", \$query)->toArray();
267-
if (\$result) {
268-
var_dump(array("ok" => 1));
269-
} else {
270-
var_dump(array("ok" => 0, "errmsg" => "Empty result"));
271-
}
267+
var_dump(array("ok" => 1));
272268
} catch(Exception \$e) {
273269
var_dump(array("ok" => 0, "errmsg" => get_class(\$e) . ": " . \$e->getMessage()));
274270
}

0 commit comments

Comments
 (0)