Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-991

Add comprehensive testing for driver.Operation.Execute

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Do
    • Icon: Major - P3 Major - P3
    • None
    • None
    • Testing
    • None

    Description

      The driver.Operation type has a complex Execute method. Instead of unit testing this method, we should design and build a system, using a mock Deployment implementation, that can ensure that various properties hold. For example, a property might be to retry when a specific error type is returned from the server, or that write concern is always included except for when we're in a transaction.

       

      While we could do this with unit tests, encoding this information in unit tests would likely be noisy and difficult to change. Since the creation of wire messages from operations is something that tends to change as we add more features to MongoDB, keeping the tests for this method is important to future flexibility.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kris.brandow@mongodb.com Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: