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

Write additional collation integration tests

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 3.2.0-rc0
    • Component/s: API, Testing
    • Labels:
    • Story Points:
      1

      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.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              patrick.freed Patrick Freed
              Reporter:
              rassi J Rassi
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: