diff options
author | Dianna Hohensee <dianna.hohensee@10gen.com> | 2018-09-13 15:09:08 -0400 |
---|---|---|
committer | Dianna Hohensee <dianna.hohensee@10gen.com> | 2018-10-31 08:42:19 -0400 |
commit | 2be7f2677a40a863f336d2964f456c9d87ddc838 (patch) | |
tree | 968b48c9cb77e7669cf129d3592e7461bd2ed7df /src/mongo/db/pipeline/document_source_group_test.cpp | |
parent | 236c6c28a18210586673097ee436c5b613b6c46f (diff) | |
download | mongo-2be7f2677a40a863f336d2964f456c9d87ddc838.tar.gz |
SERVER-17010 each Sorter instance spills to a single file rather than a new file per spill to disk
Diffstat (limited to 'src/mongo/db/pipeline/document_source_group_test.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source_group_test.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/document_source_group_test.cpp b/src/mongo/db/pipeline/document_source_group_test.cpp index 091fc09880c..bde6dfdeb32 100644 --- a/src/mongo/db/pipeline/document_source_group_test.cpp +++ b/src/mongo/db/pipeline/document_source_group_test.cpp @@ -258,7 +258,7 @@ protected: expressionContext->tempDir = _tempDir.path(); _group = DocumentSourceGroup::createFromBson(specElement, expressionContext); - assertRoundTrips(_group); + assertRoundTrips(_group, expressionContext); } DocumentSourceGroup* group() { return static_cast<DocumentSourceGroup*>(_group.get()); @@ -277,13 +277,14 @@ protected: private: /** Check that the group's spec round trips. */ - void assertRoundTrips(const intrusive_ptr<DocumentSource>& group) { + void assertRoundTrips(const intrusive_ptr<DocumentSource>& group, + const boost::intrusive_ptr<ExpressionContext>& expCtx) { // We don't check against the spec that generated 'group' originally, because // $const operators may be introduced in the first serialization. BSONObj spec = toBson(group); BSONElement specElement = spec.firstElement(); intrusive_ptr<DocumentSource> generated = - DocumentSourceGroup::createFromBson(specElement, ctx()); + DocumentSourceGroup::createFromBson(specElement, expCtx); ASSERT_BSONOBJ_EQ(spec, toBson(generated)); } std::unique_ptr<QueryTestServiceContext> _queryServiceContext; |