Skip to content

Commit 9258b9d

Browse files
authored
RUST-1327 Restrict change stream tests to replsets (#665)
1 parent 0be1d67 commit 9258b9d

10 files changed

+61
-60
lines changed

src/test/spec/json/change-streams/unified/change-streams-errors.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{
22
"description": "change-streams-errors",
33
"schemaVersion": "1.7",
4+
"runOnRequirements": [
5+
{
6+
"serverless": "forbid"
7+
}
8+
],
49
"createEntities": [
510
{
611
"client": {

src/test/spec/json/change-streams/unified/change-streams-errors.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
description: "change-streams-errors"
2+
23
schemaVersion: "1.7"
4+
5+
runOnRequirements:
6+
- serverless: forbid
7+
38
createEntities:
49
- client:
510
id: &client0 client0

src/test/spec/json/change-streams/unified/change-streams-pre_and_post_images.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
{
22
"description": "change-streams-pre_and_post_images",
3-
"schemaVersion": "1.0",
3+
"schemaVersion": "1.4",
44
"runOnRequirements": [
55
{
66
"minServerVersion": "6.0.0",
77
"topologies": [
88
"replicaset",
99
"sharded-replicaset",
1010
"load-balanced"
11-
]
11+
],
12+
"serverless": "forbid"
1213
}
1314
],
1415
"createEntities": [

src/test/spec/json/change-streams/unified/change-streams-pre_and_post_images.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
description: "change-streams-pre_and_post_images"
22

3-
schemaVersion: "1.3"
3+
schemaVersion: "1.4"
44

55
runOnRequirements:
66
- minServerVersion: "6.0.0"
77
topologies: [ replicaset, sharded-replicaset, load-balanced ]
8+
serverless: forbid
89

910
createEntities:
1011
- client:

src/test/spec/json/change-streams/unified/change-streams-resume-allowlist.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"replicaset",
99
"sharded-replicaset",
1010
"load-balanced"
11-
]
11+
],
12+
"serverless": "forbid"
1213
}
1314
],
1415
"createEntities": [

src/test/spec/json/change-streams/unified/change-streams-resume-allowlist.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Tests for resume behavior on server versions that do not support the ResumableChangeStreamError label
22
description: "change-streams-resume-allowlist"
3+
34
schemaVersion: "1.7"
5+
46
runOnRequirements:
57
- minServerVersion: "3.6"
68
topologies: [ replicaset, sharded-replicaset, load-balanced ]
9+
serverless: forbid
10+
711
createEntities:
812
- client:
913
id: &client0 client0

src/test/spec/json/change-streams/unified/change-streams-resume-errorLabels.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"replicaset",
99
"sharded-replicaset",
1010
"load-balanced"
11-
]
11+
],
12+
"serverless": "forbid"
1213
}
1314
],
1415
"createEntities": [

src/test/spec/json/change-streams/unified/change-streams-resume-errorLabels.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
# Tests for resume behavior on server versions that support the ResumableChangeStreamError label
22
description: "change-streams-resume-errorlabels"
3+
34
schemaVersion: "1.7"
5+
46
runOnRequirements:
57
- minServerVersion: "4.3.1"
68
topologies: [ replicaset, sharded-replicaset, load-balanced ]
9+
serverless: forbid
10+
711
createEntities:
812
- client:
913
id: &client0 client0

src/test/spec/json/change-streams/unified/change-streams.json

Lines changed: 22 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
{
66
"minServerVersion": "3.6",
77
"topologies": [
8-
"replicaset",
9-
"sharded-replicaset"
10-
]
8+
"replicaset"
9+
],
10+
"serverless": "forbid"
1111
}
1212
],
1313
"createEntities": [
@@ -273,6 +273,15 @@
273273
},
274274
{
275275
"description": "Test new structure in ns document MUST NOT err",
276+
"runOnRequirements": [
277+
{
278+
"minServerVersion": "3.6",
279+
"maxServerVersion": "5.2.99"
280+
},
281+
{
282+
"minServerVersion": "6.0"
283+
}
284+
],
276285
"operations": [
277286
{
278287
"name": "createChangeStream",
@@ -449,10 +458,7 @@
449458
"description": "$changeStream must be the first stage in a change stream pipeline sent to the server",
450459
"runOnRequirements": [
451460
{
452-
"minServerVersion": "3.6.0",
453-
"topologies": [
454-
"replicaset"
455-
]
461+
"minServerVersion": "3.6.0"
456462
}
457463
],
458464
"operations": [
@@ -525,10 +531,7 @@
525531
"description": "The server returns change stream responses in the specified server response format",
526532
"runOnRequirements": [
527533
{
528-
"minServerVersion": "3.6.0",
529-
"topologies": [
530-
"replicaset"
531-
]
534+
"minServerVersion": "3.6.0"
532535
}
533536
],
534537
"operations": [
@@ -578,10 +581,7 @@
578581
"description": "Executing a watch helper on a Collection results in notifications for changes to the specified collection",
579582
"runOnRequirements": [
580583
{
581-
"minServerVersion": "3.6.0",
582-
"topologies": [
583-
"replicaset"
584-
]
584+
"minServerVersion": "3.6.0"
585585
}
586586
],
587587
"operations": [
@@ -666,10 +666,7 @@
666666
"description": "Change Stream should allow valid aggregate pipeline stages",
667667
"runOnRequirements": [
668668
{
669-
"minServerVersion": "3.6.0",
670-
"topologies": [
671-
"replicaset"
672-
]
669+
"minServerVersion": "3.6.0"
673670
}
674671
],
675672
"operations": [
@@ -756,10 +753,7 @@
756753
"description": "Executing a watch helper on a Database results in notifications for changes to all collections in the specified database.",
757754
"runOnRequirements": [
758755
{
759-
"minServerVersion": "3.8.0",
760-
"topologies": [
761-
"replicaset"
762-
]
756+
"minServerVersion": "3.8.0"
763757
}
764758
],
765759
"operations": [
@@ -861,10 +855,7 @@
861855
"description": "Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster.",
862856
"runOnRequirements": [
863857
{
864-
"minServerVersion": "3.8.0",
865-
"topologies": [
866-
"replicaset"
867-
]
858+
"minServerVersion": "3.8.0"
868859
}
869860
],
870861
"operations": [
@@ -985,10 +976,7 @@
985976
"description": "Test insert, update, replace, and delete event types",
986977
"runOnRequirements": [
987978
{
988-
"minServerVersion": "3.6.0",
989-
"topologies": [
990-
"replicaset"
991-
]
979+
"minServerVersion": "3.6.0"
992980
}
993981
],
994982
"operations": [
@@ -1140,10 +1128,7 @@
11401128
"description": "Test rename and invalidate event types",
11411129
"runOnRequirements": [
11421130
{
1143-
"minServerVersion": "4.0.1",
1144-
"topologies": [
1145-
"replicaset"
1146-
]
1131+
"minServerVersion": "4.0.1"
11471132
}
11481133
],
11491134
"operations": [
@@ -1220,10 +1205,7 @@
12201205
"description": "Test drop and invalidate event types",
12211206
"runOnRequirements": [
12221207
{
1223-
"minServerVersion": "4.0.1",
1224-
"topologies": [
1225-
"replicaset"
1226-
]
1208+
"minServerVersion": "4.0.1"
12271209
}
12281210
],
12291211
"operations": [
@@ -1289,10 +1271,7 @@
12891271
"description": "Test consecutive resume",
12901272
"runOnRequirements": [
12911273
{
1292-
"minServerVersion": "4.1.7",
1293-
"topologies": [
1294-
"replicaset"
1295-
]
1274+
"minServerVersion": "4.1.7"
12961275
}
12971276
],
12981277
"operations": [

src/test/spec/json/change-streams/unified/change-streams.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
11
description: "change-streams"
2+
23
schemaVersion: "1.7"
4+
35
runOnRequirements:
46
- minServerVersion: "3.6"
5-
topologies: [ replicaset, sharded-replicaset ]
7+
# TODO(DRIVERS-2323): Run all possible tests against sharded clusters once we know the
8+
# cause of unexpected command monitoring events.
9+
topologies: [ replicaset ]
10+
serverless: forbid
11+
612
createEntities:
713
- client:
814
id: &client0 client0
@@ -155,6 +161,10 @@ tests:
155161
newField: "newFieldValue"
156162

157163
- description: "Test new structure in ns document MUST NOT err"
164+
runOnRequirements:
165+
- minServerVersion: "3.6"
166+
maxServerVersion: "5.2.99"
167+
- minServerVersion: "6.0"
158168
operations:
159169
- name: createChangeStream
160170
object: *collection0
@@ -238,7 +248,6 @@ tests:
238248
- description: $changeStream must be the first stage in a change stream pipeline sent to the server
239249
runOnRequirements:
240250
- minServerVersion: "3.6.0"
241-
topologies: [ replicaset ]
242251
operations:
243252
- name: createChangeStream
244253
object: *collection0
@@ -275,7 +284,6 @@ tests:
275284
- description: The server returns change stream responses in the specified server response format
276285
runOnRequirements:
277286
- minServerVersion: "3.6.0"
278-
topologies: [ replicaset ]
279287
operations:
280288
- name: createChangeStream
281289
object: *collection0
@@ -301,7 +309,6 @@ tests:
301309
- description: Executing a watch helper on a Collection results in notifications for changes to the specified collection
302310
runOnRequirements:
303311
- minServerVersion: "3.6.0"
304-
topologies: [ replicaset ]
305312
operations:
306313
- name: createChangeStream
307314
object: *collection0
@@ -344,7 +351,6 @@ tests:
344351
- description: Change Stream should allow valid aggregate pipeline stages
345352
runOnRequirements:
346353
- minServerVersion: "3.6.0"
347-
topologies: [ replicaset ]
348354
operations:
349355
- name: createChangeStream
350356
object: *collection0
@@ -389,7 +395,6 @@ tests:
389395
- description: Executing a watch helper on a Database results in notifications for changes to all collections in the specified database.
390396
runOnRequirements:
391397
- minServerVersion: "3.8.0"
392-
topologies: [ replicaset ]
393398
operations:
394399
- name: createChangeStream
395400
object: *database0
@@ -442,7 +447,6 @@ tests:
442447
- description: Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster.
443448
runOnRequirements:
444449
- minServerVersion: "3.8.0"
445-
topologies: [ replicaset ]
446450
operations:
447451
- name: createChangeStream
448452
object: *client0
@@ -506,7 +510,6 @@ tests:
506510
- description: "Test insert, update, replace, and delete event types"
507511
runOnRequirements:
508512
- minServerVersion: "3.6.0"
509-
topologies: [ replicaset ]
510513
operations:
511514
- name: createChangeStream
512515
object: *collection0
@@ -584,7 +587,6 @@ tests:
584587
- description: Test rename and invalidate event types
585588
runOnRequirements:
586589
- minServerVersion: "4.0.1"
587-
topologies: [ replicaset ]
588590
operations:
589591
- name: createChangeStream
590592
object: *collection0
@@ -627,7 +629,6 @@ tests:
627629
- description: Test drop and invalidate event types
628630
runOnRequirements:
629631
- minServerVersion: "4.0.1"
630-
topologies: [ replicaset ]
631632
operations:
632633
- name: createChangeStream
633634
object: *collection0
@@ -661,11 +662,10 @@ tests:
661662
databaseName: *database0
662663

663664
# Test that resume logic works correctly even after consecutive retryable failures of a getMore command,
664-
# with no intervening events. This is ensured by setting the batch size of the change stream to 1,
665+
# with no intervening events. This is ensured by setting the batch size of the change stream to 1,
665666
- description: Test consecutive resume
666667
runOnRequirements:
667668
- minServerVersion: "4.1.7"
668-
topologies: [ replicaset ]
669669
operations:
670670
- name: failPoint
671671
object: testRunner

0 commit comments

Comments
 (0)