Uploaded image for project: 'Ruby Driver'
  1. Ruby Driver
  2. RUBY-1334

Spec tests should use the same format for bulk writes

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.11.0.rc0
    • Affects Version/s: None
    • Component/s: Spec Comp
    • None

      There are three changes, the first two are breaking.

      The two breaking changes are in three command-monitoring tests: "bulkWrite.yml", "unacknowledgedBulkWrite.yml" and "insertMany.yml":

      https://github.com/mongodb/specifications/commit/bebf9b688f64afdec46a860f102bad0841b04c02

      The format of the "requests" array and "ordered" option changes from this:

          operation:
            name: "bulkWrite"
            arguments:
              requests:
                - insertOne: 
                    document: { _id: 4, x: 44 }
              ordered: false
      

      To this:

          operation:
            name: "bulkWrite"
            arguments:
              requests:
                - name: "insertOne"
                  arguments:
                    document: { _id: 4, x: 44 }
              options:
                ordered: false
      

      This brings Command Monitoring tests in line with the Retryable Writes and forthcoming Transactions tests.

      The non-breaking change is in the Retryable Writes tests:

      https://github.com/mongodb/specifications/commit/c0ce96daac5661f2603bfa52c9b3f683c176a292

      Before, the tests said in prose that all MongoClients should be created with retryWrites=true. Now, the tests include the following YAML:

              clientOptions:
                  retryWrites: true
      

      The clientOptions are the same for all Retryable Writes tests. Interpreting this field now will prepare you for the Transactions tests, which make real use of the field.

            Assignee:
            emily.giurleo@mongodb.com Emily Giurleo (Inactive)
            Reporter:
            rathi.gnanasekaran Rathi Gnanasekaran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: