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

Remove the unit test used only variation of LockerImpl::lockGlobal that passes in a nullptr for opCtx

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.7.0
    • Affects Version/s: None
    • Component/s: Storage
    • Fully Compatible
    • Execution Team 2020-07-13

      1. A variation of LockerImpl::lockGlobal passes in a nullptr for opCtx and is only used in unit tests. All of the production callers use a variation of LockerImpl::lockGlobal that takes a real opCtx.

      This would requiring setting up an opCtx for the locking unit tests. It is trivial to add it to d_concurrency_test.cpp unit tests as opCtx is already available in other unit tests using the same test fixture. lock_state_test.cpp, however, just uses ServiceContextTest, which does not set up an opCtx: we would have to add an opCtx to the test fixture.

            Assignee:
            bynn.lee@mongodb.com Bynn Lee
            Reporter:
            dianna.hohensee@mongodb.com Dianna Hohensee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: