summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression_date_test.cpp
diff options
context:
space:
mode:
authorAlberto Massari <alberto.massari@mongodb.com>2022-07-28 08:57:24 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-07-28 09:54:58 +0000
commit8c46e933d477be2424eb1aa833ec966e761b0205 (patch)
treef3bfbb2012640d28e492aabe3c33006ccb6c83fe /src/mongo/db/pipeline/expression_date_test.cpp
parent8080a50c2ffae2a7587c7af6140bf50f8c7a4190 (diff)
downloadmongo-8c46e933d477be2424eb1aa833ec966e761b0205.tar.gz
SERVER-66521 allow partial optimization of expressions
Diffstat (limited to 'src/mongo/db/pipeline/expression_date_test.cpp')
-rw-r--r--src/mongo/db/pipeline/expression_date_test.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/expression_date_test.cpp b/src/mongo/db/pipeline/expression_date_test.cpp
index 9205ea29633..6f627d1480b 100644
--- a/src/mongo/db/pipeline/expression_date_test.cpp
+++ b/src/mongo/db/pipeline/expression_date_test.cpp
@@ -1624,8 +1624,9 @@ TEST_F(ExpressionDateDiffTest, EvaluatesExpression) {
Value{"century"_sd},
utc,
null,
- 5439014, // Error code.
- "$dateDiff parameter 'unit' value cannot be recognized as a time unit: century"},
+ ErrorCodes::FailedToParse, // Error code.
+ "$dateDiff parameter 'unit' value parsing failed :: caused by :: unknown time unit value: "
+ "century"},
{// Invalid 'timezone' value.
anyDate,
anyDate,
@@ -1992,9 +1993,9 @@ TEST_F(ExpressionDateArithmeticsTest, ThrowsExceptionOnInvalidInput) {
{BSON(expName << BSON("startDate"
<< "myDate"
<< "unit" << 123 << "amount" << 1)),
- 5166403},
+ 5439013},
{BSON(expName << BSON("startDate" << Date_t{} << "unit" << 123 << "amount" << 1)),
- 5166404},
+ 5439013},
{BSON(expName << BSON("startDate" << Date_t{} << "unit"
<< "decade"
<< "amount" << 1)),