Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-59853

Simplify $lookup and $unionWith tests to avoid needing manual disposal

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major - P3
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: Backlog
    • Component/s: None
    • Labels:

      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.

        Attachments

          Activity

            People

            Assignee:
            backlog-query-optimization Backlog - Query Optimization
            Reporter:
            charlie.swanson Charlie Swanson
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: