Standardize when to run global initializers and enabling test commands in all types of tests

    • Type: Improvement
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Server Programmability
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      In SERVER-104457 we had to switch the order of running global initializers and enabling test commands in unittest_main.cpp. Originally, the global initializers were run and then test commands were enabled. This caused a problem because the query code uses the test command variable to register query expressions during initialization. Since the test commands variable was false during initialization, we don't register the query test expressions and therefore they can't be used in unittests. 

      Additionally, different tests run these commands in different orders. integration_test_main.cpp runs initializers and then enables test commands, but dbtests has the opposite order. We should standardize the order of these two commands across all tests.

              Assignee:
              Unassigned
              Reporter:
              Gil Alon
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: