Add comprehensive testing for driver.Operation.Execute

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Won't Do
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Testing
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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.

            Assignee:
            Unassigned
            Reporter:
            Kristofer Brandow (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: