summaryrefslogtreecommitdiff
path: root/src/mongo/db/session_catalog_test.cpp
diff options
context:
space:
mode:
authorJason Zhang <jason.zhang@mongodb.com>2021-10-13 17:05:34 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-10-13 18:49:37 +0000
commit02198d2e8faa3adf2705555d3094c9b6a7bf3fd8 (patch)
tree9a25fb2f5f32e45f98168778ba474eef573ea71e /src/mongo/db/session_catalog_test.cpp
parent99050aa4ce30bf4207ddcacb61b7605252f963d4 (diff)
downloadmongo-02198d2e8faa3adf2705555d3094c9b6a7bf3fd8.tar.gz
SERVER-60530 Throw InternalTransactionNotSupported instead of InvalidOptions when internal transactions are not supported
Diffstat (limited to 'src/mongo/db/session_catalog_test.cpp')
-rw-r--r--src/mongo/db/session_catalog_test.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mongo/db/session_catalog_test.cpp b/src/mongo/db/session_catalog_test.cpp
index 897051311b8..1d4421388f0 100644
--- a/src/mongo/db/session_catalog_test.cpp
+++ b/src/mongo/db/session_catalog_test.cpp
@@ -134,10 +134,12 @@ TEST_F(SessionCatalogTestWithDefaultOpCtx,
RAIIServerParameterControllerForTest controller{"featureFlagInternalTransactions", false};
_opCtx->setLogicalSessionId(makeLogicalSessionIdWithTxnNumberAndUUIDForTest());
- ASSERT_THROWS_CODE(OperationContextSession(_opCtx), DBException, ErrorCodes::InvalidOptions);
+ ASSERT_THROWS_CODE(
+ OperationContextSession(_opCtx), DBException, ErrorCodes::InternalTransactionNotSupported);
_opCtx->setLogicalSessionId(makeLogicalSessionIdWithTxnUUIDForTest());
- ASSERT_THROWS_CODE(OperationContextSession(_opCtx), DBException, ErrorCodes::InvalidOptions);
+ ASSERT_THROWS_CODE(
+ OperationContextSession(_opCtx), DBException, ErrorCodes::InternalTransactionNotSupported);
ASSERT_EQ(0UL, catalog()->size());
}