Merge ServerParameterControllerForTest and RAIIServerParameterControllerForTest

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • SP Prioritized List
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None

      We should consider merging ServerParameterControllerForTest and RAIIServerParameterControllerForTest into one type, rather than providing RAII and non-RAII versions.

      From james.bronsted@mongodb.com:

      However, upon closer review of the usages of these objects, I feel that the separation between the non-RAII and the RAII type isn't useful, and is actually actively dangerous. I only found a handful of cases where a test uses `ServerParameterControllerForTest` directly and some of those improperly neglect calling `.reset()` on the object before it goes out of scope, meaning the server parameter state leaks into subsequent tests. I think we should just have one type, probably just called `ServerParameterControllerForTest`, which is an RAII type. (I'm okay with using the `RAII` prefix if it means less code-churn.)

            Assignee:
            Unassigned
            Reporter:
            Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: