summaryrefslogtreecommitdiff
path: root/src/mongo/db/curop_test.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2015-04-07 16:11:34 -0400
committerAndy Schwerin <schwerin@mongodb.com>2015-04-16 16:00:29 -0400
commitaa303eb3b5898842a0f5730472413d2b2fdc0930 (patch)
tree6d4c6991991be27c80d40bc4df67d5b31bf34166 /src/mongo/db/curop_test.cpp
parenteb8025a6ff2c3652a1f89ae513f7a4a98cd4e2ab (diff)
downloadmongo-aa303eb3b5898842a0f5730472413d2b2fdc0930.tar.gz
SERVER-17817 Make AuthorizationManager a decoration on ServiceContext.
While we're in there, make it a fatal error to call AuthorizationManager::set or AuthorizationSession::set twice on the same object.
Diffstat (limited to 'src/mongo/db/curop_test.cpp')
-rw-r--r--src/mongo/db/curop_test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mongo/db/curop_test.cpp b/src/mongo/db/curop_test.cpp
index 85ad5d98973..26a4472078c 100644
--- a/src/mongo/db/curop_test.cpp
+++ b/src/mongo/db/curop_test.cpp
@@ -74,9 +74,11 @@ namespace mongo {
sleepmillis(10);
}
- setGlobalServiceContext(stdx::make_unique<ServiceContextNoop>());
- setGlobalAuthorizationManager(
- new AuthorizationManager(new AuthzManagerExternalStateMock()));
+ auto service = stdx::make_unique<ServiceContextNoop>();
+ AuthorizationManager::set(
+ service.get(),
+ stdx::make_unique<AuthorizationManager>(new AuthzManagerExternalStateMock()));
+ setGlobalServiceContext(std::move(service));
Client::initThread("CurOpTestMain");
return Status::OK();
}