summaryrefslogtreecommitdiff
path: root/src/mongo/util/assert_util_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/util/assert_util_test.cpp')
-rw-r--r--src/mongo/util/assert_util_test.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/src/mongo/util/assert_util_test.cpp b/src/mongo/util/assert_util_test.cpp
index bf99f856563..360d534888d 100644
--- a/src/mongo/util/assert_util_test.cpp
+++ b/src/mongo/util/assert_util_test.cpp
@@ -107,32 +107,32 @@ TEST(AssertUtils, UassertNamedCodeWithOneCategory) {
ASSERT_NOT_CATCHES(ErrorCodes::NotMaster, ExceptionForCat<ErrorCategory::Interruption>);
}
-// InterruptedDueToReplStateChange - NotMasterError and Interruption
+// InterruptedDueToStepDown - NotMasterError and Interruption
MONGO_STATIC_ASSERT(
std::is_same<
- error_details::ErrorCategoriesFor<ErrorCodes::InterruptedDueToReplStateChange>,
+ error_details::ErrorCategoriesFor<ErrorCodes::InterruptedDueToStepDown>,
error_details::CategoryList<ErrorCategory::Interruption, ErrorCategory::NotMasterError>>());
-MONGO_STATIC_ASSERT(std::is_base_of<AssertionException,
- ExceptionFor<ErrorCodes::InterruptedDueToReplStateChange>>());
+MONGO_STATIC_ASSERT(
+ std::is_base_of<AssertionException, ExceptionFor<ErrorCodes::InterruptedDueToStepDown>>());
MONGO_STATIC_ASSERT(!std::is_base_of<ExceptionForCat<ErrorCategory::NetworkError>,
- ExceptionFor<ErrorCodes::InterruptedDueToReplStateChange>>());
+ ExceptionFor<ErrorCodes::InterruptedDueToStepDown>>());
MONGO_STATIC_ASSERT(std::is_base_of<ExceptionForCat<ErrorCategory::NotMasterError>,
- ExceptionFor<ErrorCodes::InterruptedDueToReplStateChange>>());
+ ExceptionFor<ErrorCodes::InterruptedDueToStepDown>>());
MONGO_STATIC_ASSERT(std::is_base_of<ExceptionForCat<ErrorCategory::Interruption>,
- ExceptionFor<ErrorCodes::InterruptedDueToReplStateChange>>());
+ ExceptionFor<ErrorCodes::InterruptedDueToStepDown>>());
TEST(AssertUtils, UassertNamedCodeWithTwoCategories) {
- ASSERT_CATCHES(ErrorCodes::InterruptedDueToReplStateChange, DBException);
- ASSERT_CATCHES(ErrorCodes::InterruptedDueToReplStateChange, AssertionException);
- ASSERT_CATCHES(ErrorCodes::InterruptedDueToReplStateChange,
- ExceptionFor<ErrorCodes::InterruptedDueToReplStateChange>);
- ASSERT_NOT_CATCHES(ErrorCodes::InterruptedDueToReplStateChange,
+ ASSERT_CATCHES(ErrorCodes::InterruptedDueToStepDown, DBException);
+ ASSERT_CATCHES(ErrorCodes::InterruptedDueToStepDown, AssertionException);
+ ASSERT_CATCHES(ErrorCodes::InterruptedDueToStepDown,
+ ExceptionFor<ErrorCodes::InterruptedDueToStepDown>);
+ ASSERT_NOT_CATCHES(ErrorCodes::InterruptedDueToStepDown,
ExceptionFor<ErrorCodes::DuplicateKey>);
- ASSERT_NOT_CATCHES(ErrorCodes::InterruptedDueToReplStateChange,
+ ASSERT_NOT_CATCHES(ErrorCodes::InterruptedDueToStepDown,
ExceptionForCat<ErrorCategory::NetworkError>);
- ASSERT_CATCHES(ErrorCodes::InterruptedDueToReplStateChange,
+ ASSERT_CATCHES(ErrorCodes::InterruptedDueToStepDown,
ExceptionForCat<ErrorCategory::NotMasterError>);
- ASSERT_CATCHES(ErrorCodes::InterruptedDueToReplStateChange,
+ ASSERT_CATCHES(ErrorCodes::InterruptedDueToStepDown,
ExceptionForCat<ErrorCategory::Interruption>);
}