diff options
Diffstat (limited to 'src/mongo/db/catalog/collection_test.cpp')
| -rw-r--r-- | src/mongo/db/catalog/collection_test.cpp | 26 |
1 files changed, 2 insertions, 24 deletions
diff --git a/src/mongo/db/catalog/collection_test.cpp b/src/mongo/db/catalog/collection_test.cpp index 00c131756ac..fd73c68bad8 100644 --- a/src/mongo/db/catalog/collection_test.cpp +++ b/src/mongo/db/catalog/collection_test.cpp @@ -403,9 +403,7 @@ TEST_F(CollectionTest, CheckTimeseriesBucketDocsForMixedSchemaData) { "max" : { "x" : [ 2, 3 ] } } })")}; for (const auto& controlDoc : mixedSchemaControlDocs) { - auto mixedSchema = coll->doesTimeseriesBucketsDocContainMixedSchemaData(controlDoc); - ASSERT_OK(mixedSchema) << controlDoc; - ASSERT_TRUE(mixedSchema.getValue()) << controlDoc; + ASSERT_TRUE(coll->doesTimeseriesBucketsDocContainMixedSchemaData(controlDoc)); } std::vector<BSONObj> nonMixedSchemaControlDocs = { @@ -462,27 +460,7 @@ TEST_F(CollectionTest, CheckTimeseriesBucketDocsForMixedSchemaData) { for (const auto& controlDoc : nonMixedSchemaControlDocs) { - auto mixedSchema = coll->doesTimeseriesBucketsDocContainMixedSchemaData(controlDoc); - ASSERT_OK(mixedSchema) << controlDoc; - ASSERT_FALSE(mixedSchema.getValue()) << controlDoc; - } - - std::vector<BSONObj> malformedControlDocs = { - // Inconsistent field name ordering - ::mongo::fromjson(R"({ "control" : { "min" : { "x" : 1, "y" : 1 }, - "max" : { "y" : 2, "x" : 2 } } })"), - - // Extra field in min - ::mongo::fromjson(R"({ "control" : { "min" : { "x" : 1, "y" : 1 }, - "max" : { "x" : 2 } } })"), - - // Extra field in max - ::mongo::fromjson(R"({ "control" : { "min" : { "y" : 1 }, - "max" : { "y" : 2, "x" : 2 } } })")}; - - for (const auto& controlDoc : malformedControlDocs) { - ASSERT_NOT_OK(coll->doesTimeseriesBucketsDocContainMixedSchemaData(controlDoc)) - << controlDoc; + ASSERT_FALSE(coll->doesTimeseriesBucketsDocContainMixedSchemaData(controlDoc)); } } |
