[SERVER-20705] Increase unit test coverage of query execution stages Created: 30/Sep/15 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | David Storch | Assignee: | Backlog - Query Execution |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Assigned Teams: |
Query Execution
|
||||||||
| Participants: | |||||||||
| Description |
|
We should have a unit test for every query execution stage. Doing so is non-trivial as it may require mocking / untangling of dependencies. For instance, it would be nice to be able to unit test UpdateStage without a real collection or performing real writes. A mock collection could accept writes or be configured to issue WriteConflictException at predictable points in the test. Similarly, we could create mock implementations of IndexCursor and RecordCursor in order to unit test stages which perform data access. |