Skip to content

Commit 3cb20c1

Browse files
authored
DRIVERS-1995: Restrict "test server error on projecting out _id" test to 4.2 an higher (#1172)
1 parent 372747f commit 3cb20c1

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

source/change-streams/tests/unified/change-streams.json

+5
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,11 @@
640640
},
641641
{
642642
"description": "Test server error on projecting out _id",
643+
"runOnRequirements": [
644+
{
645+
"minServerVersion": "4.2"
646+
}
647+
],
643648
"operations": [
644649
{
645650
"name": "createChangeStream",

source/change-streams/tests/unified/change-streams.yml

+5-3
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ tests:
138138
- description: "Test that comment is set on getMore"
139139
runOnRequirements:
140140
- minServerVersion: "4.4.0"
141-
# Topolgies are limited because of potentially empty getMore responses
141+
# Topologies are limited because of potentially empty getMore responses
142142
# on sharded clusters.
143143
# See https://jira.mongodb.org/browse/DRIVERS-2248 for more details.
144144
topologies: [ replicaset ]
@@ -183,7 +183,7 @@ tests:
183183
- description: "Test that comment is not set on getMore - pre 4.4"
184184
runOnRequirements:
185185
- maxServerVersion: "4.3.99"
186-
# Topolgies are limited because of potentially empty getMore responses
186+
# Topologies are limited because of potentially empty getMore responses
187187
# on sharded clusters.
188188
# See https://jira.mongodb.org/browse/DRIVERS-2248 for more details.
189189
topologies: [ replicaset ]
@@ -334,6 +334,9 @@ tests:
334334
viewOn: "db.coll"
335335

336336
- description: "Test server error on projecting out _id"
337+
runOnRequirements:
338+
- minServerVersion: "4.2"
339+
# Server returns an error if _id is modified on versions 4.2 and higher
337340
operations:
338341
- name: createChangeStream
339342
object: *collection0
@@ -371,4 +374,3 @@ tests:
371374
db: *database0
372375
coll: *collection0
373376
newField: "value"
374-

0 commit comments

Comments
 (0)