diff options
Diffstat (limited to 'src/mongo/util/assert_util_test.cpp')
-rw-r--r-- | src/mongo/util/assert_util_test.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mongo/util/assert_util_test.cpp b/src/mongo/util/assert_util_test.cpp index 05b33ea3e4b..754d747b5da 100644 --- a/src/mongo/util/assert_util_test.cpp +++ b/src/mongo/util/assert_util_test.cpp @@ -87,9 +87,10 @@ TEST(AssertUtils, UassertNamedCodeWithoutCategories) { ASSERT_NOT_CATCHES(ErrorCodes::BadValue, ExceptionForCat<ErrorCategory::Interruption>); } -// NotMaster - just NotMasterError +// NotMaster - NotMasterError, RetriableError MONGO_STATIC_ASSERT(std::is_same<error_details::ErrorCategoriesFor<ErrorCodes::NotMaster>, - error_details::CategoryList<ErrorCategory::NotMasterError>>()); + error_details::CategoryList<ErrorCategory::NotMasterError, + ErrorCategory::RetriableError>>()); MONGO_STATIC_ASSERT(std::is_base_of<AssertionException, ExceptionFor<ErrorCodes::NotMaster>>()); MONGO_STATIC_ASSERT(!std::is_base_of<ExceptionForCat<ErrorCategory::NetworkError>, ExceptionFor<ErrorCodes::NotMaster>>()); @@ -108,11 +109,12 @@ TEST(AssertUtils, UassertNamedCodeWithOneCategory) { ASSERT_NOT_CATCHES(ErrorCodes::NotMaster, ExceptionForCat<ErrorCategory::Interruption>); } -// InterruptedDueToReplStateChange - NotMasterError and Interruption +// InterruptedDueToReplStateChange - NotMasterError, Interruption, RetriableError MONGO_STATIC_ASSERT( - std::is_same< - error_details::ErrorCategoriesFor<ErrorCodes::InterruptedDueToReplStateChange>, - error_details::CategoryList<ErrorCategory::Interruption, ErrorCategory::NotMasterError>>()); + std::is_same<error_details::ErrorCategoriesFor<ErrorCodes::InterruptedDueToReplStateChange>, + error_details::CategoryList<ErrorCategory::Interruption, + ErrorCategory::NotMasterError, + ErrorCategory::RetriableError>>()); MONGO_STATIC_ASSERT(std::is_base_of<AssertionException, ExceptionFor<ErrorCodes::InterruptedDueToReplStateChange>>()); MONGO_STATIC_ASSERT(!std::is_base_of<ExceptionForCat<ErrorCategory::NetworkError>, |