[CXX-1940] spec tests that run count should not use estimated count helper Created: 12/Feb/20  Updated: 28/Oct/23  Resolved: 03/Jun/20

Status: Closed
Project: C++ Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 3.6.0-rc0, 3.6.0

Type: Task Priority: Major - P3
Reporter: Samantha Ritter (Inactive) Assignee: Kevin Albertson
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CXX-1931 Remove code deprecated in previous re... Closed

 Description   

This method is meant to be used to test the count command, but it cannot take a filter or a session.  Change the C++ driver's spec test runner to simply run the count command for spec tests instead of running them through this helper method.



 Comments   
Comment by Kevin Albertson [ 04/Jun/20 ]

PR: https://github.com/mongodb/mongo-cxx-driver/pull/661

Comment by Kevin Albertson [ 03/Jun/20 ]

Tests that use the deprecated count command are now skipped. The deprecated count helper was removed in CXX-1931.

Comment by Githook User [ 03/Jun/20 ]

Author:

{'name': 'Kevin Albertson', 'email': 'kevin.albertson@mongodb.com', 'username': 'kevinAlbs'}

Message: CXX-1940 Skip tests for removed count helper
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/26b98af0cec2698f4b8338f4eae68e8d2dc79fd9

Comment by Samantha Ritter (Inactive) [ 10/Mar/20 ]

Ah.  In that case, the C++ driver's test runner needs to be fixed.  I'm going to reword this ticket and reopen it.

Comment by Bernie Hackett [ 06/Mar/20 ]

Those tests just use the count command, not the estimated_document_count helper.

Comment by Samantha Ritter (Inactive) [ 06/Mar/20 ]

behackett there are spec tests that check that the count command (so, the "estimated document count") can be run with a filter, and they expect to see the actual count command get run rather than an aggregation pipeline, for example this CSE test and this command monitoring test.

Does this mean that these spec tests are wrong and should get changed, and that drivers have non-CRUD-spec compliant count implementations?

Comment by Bernie Hackett [ 12/Feb/20 ]

This is by design:

https://github.com/mongodb/specifications/blob/master/source/crud/crud.rst#estimateddocumentcount

Generated at Wed Feb 07 22:04:24 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.