File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/libmongoc/tests/unified Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -724,10 +724,13 @@ operation_create_find_cursor (test_t *test,
724
724
cursor = mongoc_collection_find_with_opts (
725
725
coll , filter , opts , NULL /* read prefs */ );
726
726
727
+ ret = true;
728
+
729
+ mongoc_cursor_error_document (cursor , & op_error , & op_reply );
730
+ result_from_val_and_reply (result , NULL , (bson_t * ) op_reply , & op_error );
727
731
728
732
if (!op -> save_result_as_entity ) {
729
- test_set_error (error ,
730
- "unexpected createFindCursor does not save result" );
733
+ mongoc_cursor_destroy (cursor );
731
734
goto done ;
732
735
}
733
736
@@ -736,10 +739,6 @@ operation_create_find_cursor (test_t *test,
736
739
goto done ;
737
740
}
738
741
739
- mongoc_cursor_error_document (cursor , & op_error , & op_reply );
740
- result_from_val_and_reply (result , NULL , (bson_t * ) op_reply , & op_error );
741
-
742
- ret = true;
743
742
done :
744
743
bson_parser_destroy_with_parsed_fields (parser );
745
744
bson_destroy (opts );
You can’t perform that action at this time.
0 commit comments