summaryrefslogtreecommitdiff
path: root/jstests
diff options
context:
space:
mode:
Diffstat (limited to 'jstests')
-rw-r--r--jstests/change_streams/ban_from_lookup.js7
-rw-r--r--jstests/sharding/change_streams.js3
2 files changed, 4 insertions, 6 deletions
diff --git a/jstests/change_streams/ban_from_lookup.js b/jstests/change_streams/ban_from_lookup.js
index 08bc600ad55..b799c3ce169 100644
--- a/jstests/change_streams/ban_from_lookup.js
+++ b/jstests/change_streams/ban_from_lookup.js
@@ -13,9 +13,8 @@
assert.writeOK(coll.insert({_id: 1}));
// Verify that we cannot create a $lookup using a pipeline which begins with $changeStream.
- assertErrorCode(coll,
- [{$lookup: {from: foreignColl, as: 'as', pipeline: [{$changeStream: {}}]}}],
- ErrorCodes.IllegalOperation);
+ assertErrorCode(
+ coll, [{$lookup: {from: foreignColl, as: 'as', pipeline: [{$changeStream: {}}]}}], 51047);
// Verify that we cannot create a $lookup if its pipeline contains a sub-$lookup whose pipeline
// begins with $changeStream.
@@ -31,5 +30,5 @@
]
}
}],
- ErrorCodes.IllegalOperation);
+ 51047);
})();
diff --git a/jstests/sharding/change_streams.js b/jstests/sharding/change_streams.js
index 142b621f1fe..98039231687 100644
--- a/jstests/sharding/change_streams.js
+++ b/jstests/sharding/change_streams.js
@@ -46,8 +46,7 @@
[{$changeStream: {}}, {$group: {_id: '$documentKey'}}],
ErrorCodes.IllegalOperation);
- // Test that using change streams with any stages not allowed to run on mongos results in an
- // error.
+ // Test that using change streams with $out results in an error.
assertErrorCode(
mongosColl, [{$changeStream: {}}, {$out: "shouldntWork"}], ErrorCodes.IllegalOperation);