Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1339

Write additional collation integration tests



    • Task
    • Status: Closed
    • Major - P3
    • Resolution: Done
    • None
    • 3.2.0-rc0
    • API, Testing


      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.


        Issue Links



              patrick.freed@mongodb.com Patrick Freed
              rassi J Rassi
              0 Vote for this issue
              2 Start watching this issue