[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: SERVER-59853 Simplify $lookup and $unionWith tests to avoid needing manual disposal
Branch: davish/SERVER-63099
https://github.com/mongodb/mongo/commit/db36a9a1604517c7a59dd1703aef501efbfae08a

Comment by Githook User [ 23/Jun/22 ]

Author:

{'name': 'Henri Nikku', 'email': 'henri.nikku@mongodb.com', 'username': 'henrinikku'}

Message: SERVER-59853 Simplify $lookup and $unionWith tests to avoid needing manual disposal
Branch: master
https://github.com/mongodb/mongo/commit/db36a9a1604517c7a59dd1703aef501efbfae08a

Generated at Thu Feb 08 05:48:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.