[SERVER-59853] Simplify $lookup and $unionWith tests to avoid needing manual disposal Created: 09/Sep/21 Updated: 24/Jun/22 Resolved: 24/Jun/22 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Charlie Swanson | Assignee: | Henri Nikku |
| Resolution: | Done | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Participants: |
| Description |
|
Currently a bunch of our unit tests for $lookup end with a line calling dispose, like this one. This is a nuisance for readers and authors. It's easy to forget, and doesn't really add anything to the test. We should look into having a helper method return a $lookup stage via a unique_ptr with a custom destructor/deleter like Pipeline has or to use a ScopeGuard or something else to make this more automatic and less of a distraction. |
| Comments |
| Comment by Githook User [ 23/Jun/22 ] |
|
Author: {'name': 'Henri Nikku', 'email': 'henri.nikku@mongodb.com', 'username': 'henrinikku'}Message: |
| Comment by Githook User [ 23/Jun/22 ] |
|
Author: {'name': 'Henri Nikku', 'email': 'henri.nikku@mongodb.com', 'username': 'henrinikku'}Message: |