From 469e035efb09fe7c59579e00796d4f6d429fb434 Mon Sep 17 00:00:00 2001 From: Maria van Keulen Date: Tue, 19 Sep 2017 16:45:33 -0400 Subject: Revert "SERVER-30933 Change invariant to uassert for invalid uuid in queries" This reverts commit 3eedd24bb8448e9a491a03d8eaa21999d4ea9405. --- src/mongo/db/query/query_request_test.cpp | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'src/mongo/db/query/query_request_test.cpp') diff --git a/src/mongo/db/query/query_request_test.cpp b/src/mongo/db/query/query_request_test.cpp index 5fde88e0e22..a838cfd1882 100644 --- a/src/mongo/db/query/query_request_test.cpp +++ b/src/mongo/db/query/query_request_test.cpp @@ -32,14 +32,11 @@ #include #include -#include "mongo/db/catalog/collection_mock.h" -#include "mongo/db/catalog/uuid_catalog.h" #include "mongo/db/dbmessage.h" #include "mongo/db/json.h" #include "mongo/db/namespace_string.h" #include "mongo/db/pipeline/aggregation_request.h" #include "mongo/db/query/query_request.h" -#include "mongo/db/service_context_noop.h" #include "mongo/unittest/unittest.h" namespace mongo { @@ -1421,22 +1418,5 @@ TEST(QueryRequestTest, ParseFromLegacyQueryTooNegativeNToReturn) { .getStatus()); } -TEST(QueryRequestTest, ParseFromUUID) { - ServiceContextNoop service; - auto client = service.makeClient("test"); - auto opCtxNoop = client->makeOperationContext(); - auto opCtx = opCtxNoop.get(); - // Register a UUID/Collection pair in the UUIDCatalog. - const CollectionUUID uuid = UUID::gen(); - const NamespaceString nss("test.testns"); - Collection coll(stdx::make_unique(nss)); - UUIDCatalog& catalog = UUIDCatalog::get(opCtx); - catalog.onCreateCollection(opCtx, &coll, uuid); - QueryRequest qr(uuid); - // Ensure a call to refreshNSS succeeds. - qr.refreshNSS(opCtx); - ASSERT_EQ(nss, qr.nss()); -} - } // namespace mongo } // namespace -- cgit v1.2.1