[SERVER-40033] Implement mock mongot for testing Created: 07/Mar/19 Updated: 29/Oct/23 Resolved: 13/May/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Querying |
| Affects Version/s: | None |
| Fix Version/s: | 4.1.12 |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | Evan Nixon | Assignee: | Ian Boros |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | FTS | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||
| Sprint: | Query 2019-05-20 | ||||||||
| Participants: | |||||||||
| Description |
|
Implement a mock implementation of mongot, written in C++ and reusing as much existing server source code as possible. This will allow integration testing of the internal mongotRemote aggregation stage without pulling other dependencies into the server codebase. The mock mongot should run as a standalone server process which responds to OP_MSG requests. Instead of performing real query execution, however, it can return mock data in response to all requests. There can be a command to pre-populate the data that the mongot mock should return on the next request. Original descriptionThink through and implement tests for $mongotRemote, particularly on how to exercise functionality that communicates with mongot. From a conversation with david.storch, these are ways we could potentially implement these:
(Update) We have decided to move forward with option 2: implement integration tests and a suite in SERVER to mock mongot. |
| Comments |
| Comment by Githook User [ 13/May/19 ] |
|
Author: {'email': 'puppyofkosh@gmail.com', 'name': 'Ian Boros', 'username': 'puppyofkosh'}Message: |
| Comment by Githook User [ 13/May/19 ] |
|
Author: {'email': 'puppyofkosh@gmail.com', 'name': 'Ian Boros', 'username': 'puppyofkosh'}Message: |
| Comment by David Storch [ 03/Apr/19 ] |
|
evan.nixon, yep, seems reasonable. I made some additional edits to the title and description of the ticket in order to clarify the plan. |
| Comment by Evan Nixon [ 28/Mar/19 ] |
|
david.storch yes that seems right to me, do those updates look OK to you? I agree that we should break that work down, but I think it makes sense to wait on that until we have a concrete plan for communication between mongod and mongot. I'd like to flesh this ticket out more too after things settle if that makes sense to you. |
| Comment by David Storch [ 28/Mar/19 ] |
|
evan.nixon I believe we decided on option 2: building a mock mongot for integration testing in the server repository. Can you update the ticket accordingly? Also, presumably we should break down the work of writing the mock into multiple work items? |