summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_facet_test.cpp
diff options
context:
space:
mode:
authorBernard Gorman <bernard.gorman@gmail.com>2017-09-26 11:46:58 -0400
committerBernard Gorman <bernard.gorman@gmail.com>2017-09-27 22:12:14 -0400
commit55637833c707998f685f997d43624c52cde99b45 (patch)
treebbc00a719c14983e8984d1dbe8dbddd074e023a7 /src/mongo/db/pipeline/document_source_facet_test.cpp
parent22c34669f744ea245c14a64c556d61f8932ceda9 (diff)
downloadmongo-55637833c707998f685f997d43624c52cde99b45.tar.gz
SERVER-30871 Permit blocking aggregation stages to run on mongoS if allowDiskUse is false
Diffstat (limited to 'src/mongo/db/pipeline/document_source_facet_test.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_facet_test.cpp16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mongo/db/pipeline/document_source_facet_test.cpp b/src/mongo/db/pipeline/document_source_facet_test.cpp
index be05268fb7b..61d112906c7 100644
--- a/src/mongo/db/pipeline/document_source_facet_test.cpp
+++ b/src/mongo/db/pipeline/document_source_facet_test.cpp
@@ -186,9 +186,11 @@ public:
DocumentSourcePassthrough() : DocumentSourceMock({}) {}
StageConstraints constraints() const override {
- StageConstraints constraints;
- constraints.isAllowedInsideFacetStage = true;
- return constraints;
+ return {StreamType::kStreaming,
+ PositionRequirement::kNone,
+ HostTypeRequirement::kNone,
+ DiskUseRequirement::kNoDiskUse,
+ FacetRequirement::kAllowed};
}
DocumentSource::GetNextResult getNext() final {
@@ -625,9 +627,11 @@ TEST_F(DocumentSourceFacetTest, ShouldThrowIfAnyPipelineRequiresTextScoreButItIs
class DocumentSourceNeedsPrimaryShard final : public DocumentSourcePassthrough {
public:
StageConstraints constraints() const final {
- StageConstraints constraints;
- constraints.hostRequirement = HostTypeRequirement::kPrimaryShard;
- return constraints;
+ return {StreamType::kStreaming,
+ PositionRequirement::kNone,
+ HostTypeRequirement::kPrimaryShard,
+ DiskUseRequirement::kNoDiskUse,
+ FacetRequirement::kAllowed};
}
static boost::intrusive_ptr<DocumentSourceNeedsPrimaryShard> create() {