diff options
author | Jason Zhang <jason.zhang@mongodb.com> | 2021-10-13 17:05:34 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-10-13 18:49:37 +0000 |
commit | 02198d2e8faa3adf2705555d3094c9b6a7bf3fd8 (patch) | |
tree | 9a25fb2f5f32e45f98168778ba474eef573ea71e /src/mongo/db/session_catalog_test.cpp | |
parent | 99050aa4ce30bf4207ddcacb61b7605252f963d4 (diff) | |
download | mongo-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.cpp | 6 |
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()); } |