summaryrefslogtreecommitdiff
path: root/src/mongo/util/assert_util_test.cpp
diff options
context:
space:
mode:
authorNathan Louie <nathan.louie@10gen.com>2018-06-05 13:37:23 -0400
committerNathan Louie <nathan.louie@10gen.com>2018-06-06 09:43:38 -0400
commit0ca1e56c5c045872e613f4a3ad68e40edfe66283 (patch)
tree22f9c93a06676c3d262ceef4d169b20ce54bb538 /src/mongo/util/assert_util_test.cpp
parent1b4b21a148c0a849693f5d3fcb18611893811e5e (diff)
downloadmongo-0ca1e56c5c045872e613f4a3ad68e40edfe66283.tar.gz
SERVER-34817 find replace from InterruptedDueToReplStateChange error code to InterruptedDueToStepDown
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>);
}