Skip to content

Commit 6546428

Browse files
restrict change stream tests to replica sets
1 parent 03886b1 commit 6546428

File tree

2 files changed

+24
-70
lines changed

2 files changed

+24
-70
lines changed

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

Lines changed: 13 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@
55
{
66
"minServerVersion": "3.6",
77
"topologies": [
8-
"replicaset",
9-
"sharded-replicaset"
8+
"replicaset"
109
]
1110
}
1211
],
@@ -313,10 +312,7 @@
313312
"description": "Test that comment is set on getMore",
314313
"runOnRequirements": [
315314
{
316-
"minServerVersion": "4.4.0",
317-
"topologies": [
318-
"replicaset"
319-
]
315+
"minServerVersion": "4.4.0"
320316
}
321317
],
322318
"operations": [
@@ -404,10 +400,7 @@
404400
"description": "Test that comment is not set on getMore - pre 4.4",
405401
"runOnRequirements": [
406402
{
407-
"maxServerVersion": "4.3.99",
408-
"topologies": [
409-
"replicaset"
410-
]
403+
"maxServerVersion": "4.3.99"
411404
}
412405
],
413406
"operations": [
@@ -796,10 +789,7 @@
796789
"description": "$changeStream must be the first stage in a change stream pipeline sent to the server",
797790
"runOnRequirements": [
798791
{
799-
"minServerVersion": "3.6.0",
800-
"topologies": [
801-
"replicaset"
802-
]
792+
"minServerVersion": "3.6.0"
803793
}
804794
],
805795
"operations": [
@@ -872,10 +862,7 @@
872862
"description": "The server returns change stream responses in the specified server response format",
873863
"runOnRequirements": [
874864
{
875-
"minServerVersion": "3.6.0",
876-
"topologies": [
877-
"replicaset"
878-
]
865+
"minServerVersion": "3.6.0"
879866
}
880867
],
881868
"operations": [
@@ -925,10 +912,7 @@
925912
"description": "Executing a watch helper on a Collection results in notifications for changes to the specified collection",
926913
"runOnRequirements": [
927914
{
928-
"minServerVersion": "3.6.0",
929-
"topologies": [
930-
"replicaset"
931-
]
915+
"minServerVersion": "3.6.0"
932916
}
933917
],
934918
"operations": [
@@ -1013,10 +997,7 @@
1013997
"description": "Change Stream should allow valid aggregate pipeline stages",
1014998
"runOnRequirements": [
1015999
{
1016-
"minServerVersion": "3.6.0",
1017-
"topologies": [
1018-
"replicaset"
1019-
]
1000+
"minServerVersion": "3.6.0"
10201001
}
10211002
],
10221003
"operations": [
@@ -1103,10 +1084,7 @@
11031084
"description": "Executing a watch helper on a Database results in notifications for changes to all collections in the specified database.",
11041085
"runOnRequirements": [
11051086
{
1106-
"minServerVersion": "3.8.0",
1107-
"topologies": [
1108-
"replicaset"
1109-
]
1087+
"minServerVersion": "3.8.0"
11101088
}
11111089
],
11121090
"operations": [
@@ -1208,10 +1186,7 @@
12081186
"description": "Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster.",
12091187
"runOnRequirements": [
12101188
{
1211-
"minServerVersion": "3.8.0",
1212-
"topologies": [
1213-
"replicaset"
1214-
]
1189+
"minServerVersion": "3.8.0"
12151190
}
12161191
],
12171192
"operations": [
@@ -1332,10 +1307,7 @@
13321307
"description": "Test insert, update, replace, and delete event types",
13331308
"runOnRequirements": [
13341309
{
1335-
"minServerVersion": "3.6.0",
1336-
"topologies": [
1337-
"replicaset"
1338-
]
1310+
"minServerVersion": "3.6.0"
13391311
}
13401312
],
13411313
"operations": [
@@ -1487,10 +1459,7 @@
14871459
"description": "Test rename and invalidate event types",
14881460
"runOnRequirements": [
14891461
{
1490-
"minServerVersion": "4.0.1",
1491-
"topologies": [
1492-
"replicaset"
1493-
]
1462+
"minServerVersion": "4.0.1"
14941463
}
14951464
],
14961465
"operations": [
@@ -1567,10 +1536,7 @@
15671536
"description": "Test drop and invalidate event types",
15681537
"runOnRequirements": [
15691538
{
1570-
"minServerVersion": "4.0.1",
1571-
"topologies": [
1572-
"replicaset"
1573-
]
1539+
"minServerVersion": "4.0.1"
15741540
}
15751541
],
15761542
"operations": [
@@ -1636,10 +1602,7 @@
16361602
"description": "Test consecutive resume",
16371603
"runOnRequirements": [
16381604
{
1639-
"minServerVersion": "4.1.7",
1640-
"topologies": [
1641-
"replicaset"
1642-
]
1605+
"minServerVersion": "4.1.7"
16431606
}
16441607
],
16451608
"operations": [

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

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
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+
611
createEntities:
712
- client:
813
id: &client0 client0
@@ -175,10 +180,6 @@ tests:
175180
- description: "Test that comment is set on getMore"
176181
runOnRequirements:
177182
- minServerVersion: "4.4.0"
178-
# Topologies are limited because of potentially empty getMore responses
179-
# on sharded clusters.
180-
# See https://jira.mongodb.org/browse/DRIVERS-2248 for more details.
181-
topologies: [ replicaset ]
182183
operations:
183184
- name: createChangeStream
184185
object: *collection0
@@ -220,10 +221,6 @@ tests:
220221
- description: "Test that comment is not set on getMore - pre 4.4"
221222
runOnRequirements:
222223
- maxServerVersion: "4.3.99"
223-
# Topologies are limited because of potentially empty getMore responses
224-
# on sharded clusters.
225-
# See https://jira.mongodb.org/browse/DRIVERS-2248 for more details.
226-
topologies: [ replicaset ]
227224
operations:
228225
- name: createChangeStream
229226
object: *collection0
@@ -330,6 +327,10 @@ tests:
330327
newField: "newFieldValue"
331328

332329
- description: "Test new structure in ns document MUST NOT err"
330+
runOnRequirements:
331+
- minServerVersion: "3.6"
332+
maxServerVersion: "5.2.99"
333+
- minServerVersion: "6.0"
333334
operations:
334335
- name: createChangeStream
335336
object: *collection0
@@ -413,7 +414,6 @@ tests:
413414
- description: $changeStream must be the first stage in a change stream pipeline sent to the server
414415
runOnRequirements:
415416
- minServerVersion: "3.6.0"
416-
topologies: [ replicaset ]
417417
operations:
418418
- name: createChangeStream
419419
object: *collection0
@@ -450,7 +450,6 @@ tests:
450450
- description: The server returns change stream responses in the specified server response format
451451
runOnRequirements:
452452
- minServerVersion: "3.6.0"
453-
topologies: [ replicaset ]
454453
operations:
455454
- name: createChangeStream
456455
object: *collection0
@@ -476,7 +475,6 @@ tests:
476475
- description: Executing a watch helper on a Collection results in notifications for changes to the specified collection
477476
runOnRequirements:
478477
- minServerVersion: "3.6.0"
479-
topologies: [ replicaset ]
480478
operations:
481479
- name: createChangeStream
482480
object: *collection0
@@ -519,7 +517,6 @@ tests:
519517
- description: Change Stream should allow valid aggregate pipeline stages
520518
runOnRequirements:
521519
- minServerVersion: "3.6.0"
522-
topologies: [ replicaset ]
523520
operations:
524521
- name: createChangeStream
525522
object: *collection0
@@ -564,7 +561,6 @@ tests:
564561
- description: Executing a watch helper on a Database results in notifications for changes to all collections in the specified database.
565562
runOnRequirements:
566563
- minServerVersion: "3.8.0"
567-
topologies: [ replicaset ]
568564
operations:
569565
- name: createChangeStream
570566
object: *database0
@@ -617,7 +613,6 @@ tests:
617613
- description: Executing a watch helper on a MongoClient results in notifications for changes to all collections in all databases in the cluster.
618614
runOnRequirements:
619615
- minServerVersion: "3.8.0"
620-
topologies: [ replicaset ]
621616
operations:
622617
- name: createChangeStream
623618
object: *client0
@@ -681,7 +676,6 @@ tests:
681676
- description: "Test insert, update, replace, and delete event types"
682677
runOnRequirements:
683678
- minServerVersion: "3.6.0"
684-
topologies: [ replicaset ]
685679
operations:
686680
- name: createChangeStream
687681
object: *collection0
@@ -759,7 +753,6 @@ tests:
759753
- description: Test rename and invalidate event types
760754
runOnRequirements:
761755
- minServerVersion: "4.0.1"
762-
topologies: [ replicaset ]
763756
operations:
764757
- name: createChangeStream
765758
object: *collection0
@@ -802,7 +795,6 @@ tests:
802795
- description: Test drop and invalidate event types
803796
runOnRequirements:
804797
- minServerVersion: "4.0.1"
805-
topologies: [ replicaset ]
806798
operations:
807799
- name: createChangeStream
808800
object: *collection0
@@ -836,11 +828,10 @@ tests:
836828
databaseName: *database0
837829

838830
# Test that resume logic works correctly even after consecutive retryable failures of a getMore command,
839-
# with no intervening events. This is ensured by setting the batch size of the change stream to 1,
831+
# with no intervening events. This is ensured by setting the batch size of the change stream to 1,
840832
- description: Test consecutive resume
841833
runOnRequirements:
842834
- minServerVersion: "4.1.7"
843-
topologies: [ replicaset ]
844835
operations:
845836
- name: failPoint
846837
object: testRunner

0 commit comments

Comments
 (0)