[GODRIVER-991] Add comprehensive testing for driver.Operation.Execute Created: 23/Apr/19  Updated: 24/Jul/20  Resolved: 24/Jul/20

Status: Closed
Project: Go Driver
Component/s: Testing
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Unassigned
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
is duplicated by GODRIVER-296 Fully test the dispatch package Closed

 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.


Generated at Thu Feb 08 08:35:25 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.