Merge ServerParameterControllerForTest and RAIIServerParameterControllerForTest

XMLWordPrintableJSON

    • Server Programmability
    • Fully Compatible
    • Programmability 2026-05-26
    • None
    • 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:
            Uyiosa Iyekekpolor (Inactive)
            Reporter:
            Gregory Noma
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: