[CXX-1339] Write additional collation integration tests Created: 15/May/17  Updated: 11/Aug/17  Resolved: 24/Jul/17

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

Type: Task Priority: Major - P3
Reporter: J Rassi Assignee: Patrick Freed
Resolution: Done Votes: 0
Labels: neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to CXX-1269 Audit driver against Collation spec Closed

 Description   

The collation spec mandates that drivers write the following test as part of implementing the Collation spec. The C++ driver currently lacks this test.

  1. "... drivers should test that two indexes can be created with identical key patterns and different collations. A custom name must be provided for one of them. Then, the test should ensure that the correct index is dropped when delete_one is called with an index name."

I also recommend writing the following integration tests (these are not mandated by the spec, though having them would increase our confidence that there are no issues in our integration with the C driver, and would help prevent later regressions in spec compliance):

  1. Test that a bulk write will fail if the server has maxWireVersion < 5 and any contained write specifies a collation. This is logic implemented in the C driver, and currently the C++ driver tests this indirectly via the CRUD tests, but the driver lacks tests for this condition that specifically target bulk writes. See comment referencing "model::delete_one" at CXX-1269.
  2. Test that unacknowledged deletes and updates will fail when a collation is specified. This is logic implemented in the C driver, and the C++ driver currently does not test this condition. See comment referencing "Database operations for update / delete (via both CRUD methods and write models) must fail" at CXX-1269.
  3. Test that mongocxx::database::run_command() succeeds when the command document specifies a "collation" field and the server's maxWireVersion is < 5. See comment referencing "mongocxx::database::run_command()" at CXX-1269.


 Comments   
Comment by Githook User [ 24/Jul/17 ]

Author:

{u'username': u'patrickfreed', u'name': u'Patrick Freed', u'email': u'fridpatrick@gmail.com'}

Message: CXX-1339 Write additional collation integration tests
Some fixes to the tests for older server versions.
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/f1abd8e47b1c7830f0884978c99d79f4e55a2a3d

Comment by Githook User [ 10/Jul/17 ]

Author:

{u'username': u'patrickfreed', u'name': u'Patrick Freed', u'email': u'fridpatrick@gmail.com'}

Message: CXX-1339 Write additional collation integration tests

Also fixes omission of write concern option in find_one_and_update and incorrect type for wtimeout in document conversion.
Branch: master
https://github.com/mongodb/mongo-cxx-driver/commit/ab18171b13eb4286eda8c78cd1a97bcde43a9f75

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