summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
authorKatherine Wu <katherine.wu@mongodb.com>2021-04-20 12:13:14 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-20 21:16:18 +0000
commitd9c99b4a37619309c48ade50af61f18418c13d71 (patch)
tree580f82c7b714c22164f70d8db50e1c5b358fee61 /src/mongo/db/pipeline
parent98a6e49b9a5732a7c68dab6111149a5a6145ae2f (diff)
downloadmongo-d9c99b4a37619309c48ade50af61f18418c13d71.tar.gz
SERVER-52328 Enable feature flag for Window Functions
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/document_source_set_window_fields_test.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/document_source_set_window_fields_test.cpp b/src/mongo/db/pipeline/document_source_set_window_fields_test.cpp
index d48ea82ad8e..d7146860429 100644
--- a/src/mongo/db/pipeline/document_source_set_window_fields_test.cpp
+++ b/src/mongo/db/pipeline/document_source_set_window_fields_test.cpp
@@ -113,13 +113,13 @@ TEST_F(DocumentSourceSetWindowFieldsTest, SuccessfullyParsesAndReserializes) {
ASSERT_BSONOBJ_EQ(serializedArray[0].getDocument().toBson(), spec);
}
-TEST_F(DocumentSourceSetWindowFieldsTest, FailsToParseIfFeatureFlagDisabled) {
+TEST_F(DocumentSourceSetWindowFieldsTest, SuccessfullyParsesOnceFeatureFlagEnabled) {
auto spec = fromjson(R"(
{$_internalSetWindowFields: {partitionBy: '$state', sortBy: {city: 1}, output: {mySum:
{$sum: '$pop', window: {documents: [-10, 0]}}}}})");
- // By default, the unit test will have the feature flag disabled.
- ASSERT_THROWS_CODE(
- Pipeline::parse(std::vector<BSONObj>({spec}), getExpCtx()), AssertionException, 16436);
+ // By default, the unit test will have the feature flag enabled.
+ auto pipeline = Pipeline::parse(std::vector<BSONObj>({spec}), getExpCtx());
+ ASSERT_BSONOBJ_EQ(pipeline->serializeToBson()[0], spec);
}
TEST_F(DocumentSourceSetWindowFieldsTest, HandlesEmptyInputCorrectly) {