diff options
author | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-10-10 21:10:05 -0400 |
---|---|---|
committer | Siyuan Zhou <siyuan.zhou@mongodb.com> | 2018-10-24 20:19:20 -0400 |
commit | 248601a6473fc7364e5d790a357acbace2a42f7a (patch) | |
tree | ca3b954d14757df9c41802038ff9086c6ab66037 /src/mongo/db/logical_session_id_test.cpp | |
parent | 887cc3f6db2a15d94e8ae2195d8183f16337d926 (diff) | |
download | mongo-248601a6473fc7364e5d790a357acbace2a42f7a.tar.gz |
SERVER-37179 Pass the reference of OperationSessionInfoFromClient around.
Diffstat (limited to 'src/mongo/db/logical_session_id_test.cpp')
-rw-r--r-- | src/mongo/db/logical_session_id_test.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/logical_session_id_test.cpp b/src/mongo/db/logical_session_id_test.cpp index 5a4d14705ac..1bf9e9b4658 100644 --- a/src/mongo/db/logical_session_id_test.cpp +++ b/src/mongo/db/logical_session_id_test.cpp @@ -335,13 +335,17 @@ TEST_F(LogicalSessionIdTest, InitializeOperationSessionInfo_IgnoresInfoIfNoCache LogicalSessionCache::set(_opCtx->getServiceContext(), nullptr); - ASSERT_FALSE(initializeOperationSessionInfo( + auto sessionInfo = initializeOperationSessionInfo( _opCtx.get(), BSON("TestCmd" << 1 << "lsid" << lsid.toBSON() << "txnNumber" << 100LL << "OtherField" << "TestField"), true, true, - true)); + true); + ASSERT(sessionInfo.getSessionId() == boost::none); + ASSERT(sessionInfo.getTxnNumber() == boost::none); + ASSERT(sessionInfo.getStartTransaction() == boost::none); + ASSERT(sessionInfo.getAutocommit() == boost::none); } TEST_F(LogicalSessionIdTest, InitializeOperationSessionInfo_SendingInfoFailsInDirectClient) { |