summaryrefslogtreecommitdiff
path: root/src/mongo/db/operation_context_test.cpp
diff options
context:
space:
mode:
authorPavi Vetriselvan <pvselvan@umich.edu>2020-05-28 13:00:09 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-06-26 00:45:47 +0000
commitb281adecd42a0d638d31acbf36a7affc5c0db3f9 (patch)
tree01a0feb4c08297a6563a942caeab8f7f12eef909 /src/mongo/db/operation_context_test.cpp
parent341fb5d34695cb7d0994f5d91947355d60dabf36 (diff)
downloadmongo-b281adecd42a0d638d31acbf36a7affc5c0db3f9.tar.gz
SERVER-46962 Blacklist sync sources that are shutting down
Diffstat (limited to 'src/mongo/db/operation_context_test.cpp')
-rw-r--r--src/mongo/db/operation_context_test.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/operation_context_test.cpp b/src/mongo/db/operation_context_test.cpp
index 15ae8c19f28..33beb6cf112 100644
--- a/src/mongo/db/operation_context_test.cpp
+++ b/src/mongo/db/operation_context_test.cpp
@@ -142,6 +142,14 @@ DEATH_TEST(OperationContextTest, CallingSetDeadlineWithExtraInfoCrashes, "invari
opCtx->setDeadlineByDate(Date_t::now(), ErrorCodes::ForTestingErrorExtraInfo);
}
+TEST(OperationContextTest, CallingMarkKillWithOptionalExtraInfoSucceeds) {
+ auto serviceCtx = ServiceContext::make();
+ auto client = serviceCtx->makeClient("OperationContextTest");
+ auto opCtx = client->makeOperationContext();
+
+ opCtx->markKilled(ErrorCodes::ForTestingOptionalErrorExtraInfo);
+}
+
TEST(OperationContextTest, OpCtxGroup) {
OperationContextGroup group1;
ASSERT_TRUE(group1.isEmpty());