diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-10-10 09:28:13 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2018-10-12 02:27:33 -0400 |
commit | 6ac6f0efe6e2b6452f2238beb765396f983c53cb (patch) | |
tree | ecc34bb073b4c1c43be2cdff343d7a82b1160c19 /src/mongo/db/session_catalog_test.cpp | |
parent | 5e27924959612f7ea922494bd098dac8e7af4e99 (diff) | |
download | mongo-6ac6f0efe6e2b6452f2238beb765396f983c53cb.tar.gz |
SERVER-37244 Move MongoD-specific code out of SessionCatalog
Diffstat (limited to 'src/mongo/db/session_catalog_test.cpp')
-rw-r--r-- | src/mongo/db/session_catalog_test.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/mongo/db/session_catalog_test.cpp b/src/mongo/db/session_catalog_test.cpp index 3efb8a0dcb3..02560433abd 100644 --- a/src/mongo/db/session_catalog_test.cpp +++ b/src/mongo/db/session_catalog_test.cpp @@ -28,12 +28,7 @@ #include "mongo/platform/basic.h" -#include "mongo/db/client.h" -#include "mongo/db/concurrency/d_concurrency.h" -#include "mongo/db/operation_context.h" #include "mongo/db/repl/mock_repl_coord_server_fixture.h" -#include "mongo/db/repl/read_concern_args.h" -#include "mongo/db/service_context.h" #include "mongo/db/session_catalog.h" #include "mongo/stdx/future.h" #include "mongo/stdx/memory.h" @@ -49,13 +44,11 @@ protected: void setUp() final { MockReplCoordServerFixture::setUp(); - auto service = opCtx()->getServiceContext(); - SessionCatalog::get(service)->reset_forTest(); - SessionCatalog::get(service)->onStepUp(opCtx()); + catalog()->reset_forTest(); } SessionCatalog* catalog() { - return SessionCatalog::get(opCtx()->getServiceContext()); + return SessionCatalog::get(getServiceContext()); } }; @@ -63,8 +56,8 @@ protected: class DirectClientSetter { public: explicit DirectClientSetter(OperationContext* opCtx) - : _opCtx(opCtx), _wasInDirectClient(opCtx->getClient()->isInDirectClient()) { - opCtx->getClient()->setInDirectClient(true); + : _opCtx(opCtx), _wasInDirectClient(_opCtx->getClient()->isInDirectClient()) { + _opCtx->getClient()->setInDirectClient(true); } ~DirectClientSetter() { |