From 02198d2e8faa3adf2705555d3094c9b6a7bf3fd8 Mon Sep 17 00:00:00 2001 From: Jason Zhang Date: Wed, 13 Oct 2021 17:05:34 +0000 Subject: SERVER-60530 Throw InternalTransactionNotSupported instead of InvalidOptions when internal transactions are not supported --- src/mongo/db/session_catalog_test.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/mongo/db/session_catalog_test.cpp') 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()); } -- cgit v1.2.1