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

Create tests for ServiceContext and related classes

    • Type: Icon: Task Task
    • Resolution: Unresolved
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • Programmability 2024-09-30

      The test should cover at least the following behaviors.

      • Client::makeOperationContext
      • Tripwires when creating a second OperationContext for a Client
      • ClientObservers are notified
      • OperationContext is in a sufficiently-initialized state at that point
      • Optional: Baton detached and OpCtx destroyed upon failure at certain points
      • We’ll consider refactoring or adding a failpoint so this can be tested
      • Client/ServiceContext interaction
      • Making a Client
      • ClientObservers are notified
      • Deleting a client through ClientDeleter
      • ClientObservers are notified
      • The client is removed from the OperationIdManager map
      • OperationContext/ServiceContext interaction
      • Deleting an OpCtx through OperationContextDeleter
      • ClientObservers are notified
      • Delists operation
      • Detaches baton
      • Behavior of delistOperation, killOperation, killAndDelistOperation
      • Tests for ServiceContext behavior
      • Setters enforce write-once invariants (post-SERVER-51055)
      • Tests for Client behavior
      • Behavior of initThread, set/get/releaseCurrent//haveClient/cc()
      • ThreadClient and AlternativeClientRegion
      • These are already covered by thread_client_test.cpp

            Assignee:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Reporter:
            ryan.berryhill@mongodb.com Ryan Berryhill
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: