Skip to content

Commit bb04441

Browse files
committed
chore: sync retryable reads tests for listIndex changes
NODE-2266
1 parent e40b18e commit bb04441

17 files changed

+84
-233
lines changed

test/spec/retryable-reads/README.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,10 @@ Each YAML file has the following keys:
8484
- ``bucket_name``: Optional. The GridFS bucket name to use for testing.
8585

8686
- ``data``: The data that should exist in the collection(s) under test before
87-
each test run.
87+
each test run. This will typically be an array of documents to be inserted
88+
into the collection under test (i.e. ``collection_name``); however, this field
89+
may also be an object mapping collection names to arrays of documents to be
90+
inserted into the specified collection.
8891

8992
- ``tests``: An array of tests that are to be run independently of each other.
9093
Each test will have some or all of the following fields:
@@ -126,6 +129,9 @@ GridFS Tests
126129
------------
127130

128131
GridFS tests are denoted by when the YAML file contains ``bucket_name``.
132+
The ``data`` field will also be an object, which maps collection names
133+
(e.g. ``fs.files``) to an array of documents that should be inserted into
134+
the specified collection.
129135

130136
``fs.files`` and ``fs.chunks`` should be created in the database
131137
specified by ``database_name``. This could be done via inserts or by

test/spec/retryable-reads/aggregate-merge.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"runOn": [
33
{
4-
"minServerVersion": "4.2.0"
4+
"minServerVersion": "4.1.11"
55
}
66
],
77
"database_name": "retryable-reads-tests",

test/spec/retryable-reads/aggregate-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
runOn:
22
-
3-
minServerVersion: "4.2.0"
3+
minServerVersion: "4.1.11"
44

55
database_name: &database_name "retryable-reads-tests"
66
collection_name: &collection_name "coll"

test/spec/retryable-reads/changeStreams-client.watch-serverErrors.json

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
"pipeline": [
6060
{
6161
"$changeStream": {
62-
"fullDocument": "default",
6362
"allChangesForCluster": true
6463
}
6564
}
@@ -76,7 +75,6 @@
7675
"pipeline": [
7776
{
7877
"$changeStream": {
79-
"fullDocument": "default",
8078
"allChangesForCluster": true
8179
}
8280
}
@@ -116,7 +114,6 @@
116114
"pipeline": [
117115
{
118116
"$changeStream": {
119-
"fullDocument": "default",
120117
"allChangesForCluster": true
121118
}
122119
}
@@ -133,7 +130,6 @@
133130
"pipeline": [
134131
{
135132
"$changeStream": {
136-
"fullDocument": "default",
137133
"allChangesForCluster": true
138134
}
139135
}
@@ -173,7 +169,6 @@
173169
"pipeline": [
174170
{
175171
"$changeStream": {
176-
"fullDocument": "default",
177172
"allChangesForCluster": true
178173
}
179174
}
@@ -190,7 +185,6 @@
190185
"pipeline": [
191186
{
192187
"$changeStream": {
193-
"fullDocument": "default",
194188
"allChangesForCluster": true
195189
}
196190
}
@@ -230,7 +224,6 @@
230224
"pipeline": [
231225
{
232226
"$changeStream": {
233-
"fullDocument": "default",
234227
"allChangesForCluster": true
235228
}
236229
}
@@ -247,7 +240,6 @@
247240
"pipeline": [
248241
{
249242
"$changeStream": {
250-
"fullDocument": "default",
251243
"allChangesForCluster": true
252244
}
253245
}
@@ -287,7 +279,6 @@
287279
"pipeline": [
288280
{
289281
"$changeStream": {
290-
"fullDocument": "default",
291282
"allChangesForCluster": true
292283
}
293284
}
@@ -304,7 +295,6 @@
304295
"pipeline": [
305296
{
306297
"$changeStream": {
307-
"fullDocument": "default",
308298
"allChangesForCluster": true
309299
}
310300
}
@@ -344,7 +334,6 @@
344334
"pipeline": [
345335
{
346336
"$changeStream": {
347-
"fullDocument": "default",
348337
"allChangesForCluster": true
349338
}
350339
}
@@ -361,7 +350,6 @@
361350
"pipeline": [
362351
{
363352
"$changeStream": {
364-
"fullDocument": "default",
365353
"allChangesForCluster": true
366354
}
367355
}
@@ -401,7 +389,6 @@
401389
"pipeline": [
402390
{
403391
"$changeStream": {
404-
"fullDocument": "default",
405392
"allChangesForCluster": true
406393
}
407394
}
@@ -418,7 +405,6 @@
418405
"pipeline": [
419406
{
420407
"$changeStream": {
421-
"fullDocument": "default",
422408
"allChangesForCluster": true
423409
}
424410
}
@@ -458,7 +444,6 @@
458444
"pipeline": [
459445
{
460446
"$changeStream": {
461-
"fullDocument": "default",
462447
"allChangesForCluster": true
463448
}
464449
}
@@ -475,7 +460,6 @@
475460
"pipeline": [
476461
{
477462
"$changeStream": {
478-
"fullDocument": "default",
479463
"allChangesForCluster": true
480464
}
481465
}
@@ -515,7 +499,6 @@
515499
"pipeline": [
516500
{
517501
"$changeStream": {
518-
"fullDocument": "default",
519502
"allChangesForCluster": true
520503
}
521504
}
@@ -532,7 +515,6 @@
532515
"pipeline": [
533516
{
534517
"$changeStream": {
535-
"fullDocument": "default",
536518
"allChangesForCluster": true
537519
}
538520
}
@@ -572,7 +554,6 @@
572554
"pipeline": [
573555
{
574556
"$changeStream": {
575-
"fullDocument": "default",
576557
"allChangesForCluster": true
577558
}
578559
}
@@ -589,7 +570,6 @@
589570
"pipeline": [
590571
{
591572
"$changeStream": {
592-
"fullDocument": "default",
593573
"allChangesForCluster": true
594574
}
595575
}
@@ -629,7 +609,6 @@
629609
"pipeline": [
630610
{
631611
"$changeStream": {
632-
"fullDocument": "default",
633612
"allChangesForCluster": true
634613
}
635614
}
@@ -646,7 +625,6 @@
646625
"pipeline": [
647626
{
648627
"$changeStream": {
649-
"fullDocument": "default",
650628
"allChangesForCluster": true
651629
}
652630
}
@@ -687,7 +665,6 @@
687665
"pipeline": [
688666
{
689667
"$changeStream": {
690-
"fullDocument": "default",
691668
"allChangesForCluster": true
692669
}
693670
}
@@ -704,7 +681,6 @@
704681
"pipeline": [
705682
{
706683
"$changeStream": {
707-
"fullDocument": "default",
708684
"allChangesForCluster": true
709685
}
710686
}
@@ -748,7 +724,6 @@
748724
"pipeline": [
749725
{
750726
"$changeStream": {
751-
"fullDocument": "default",
752727
"allChangesForCluster": true
753728
}
754729
}

test/spec/retryable-reads/changeStreams-client.watch-serverErrors.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ tests:
3131
command:
3232
aggregate: 1
3333
cursor: {}
34-
pipeline: [ { $changeStream: { fullDocument: "default", allChangesForCluster: true } } ]
34+
pipeline: [ { $changeStream: { allChangesForCluster: true } } ]
3535
database_name: admin
3636
- *retryable_command_started_event
3737
-

test/spec/retryable-reads/changeStreams-client.watch.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"pipeline": [
4040
{
4141
"$changeStream": {
42-
"fullDocument": "default",
4342
"allChangesForCluster": true
4443
}
4544
}
@@ -79,7 +78,6 @@
7978
"pipeline": [
8079
{
8180
"$changeStream": {
82-
"fullDocument": "default",
8381
"allChangesForCluster": true
8482
}
8583
}
@@ -96,7 +94,6 @@
9694
"pipeline": [
9795
{
9896
"$changeStream": {
99-
"fullDocument": "default",
10097
"allChangesForCluster": true
10198
}
10299
}
@@ -140,7 +137,6 @@
140137
"pipeline": [
141138
{
142139
"$changeStream": {
143-
"fullDocument": "default",
144140
"allChangesForCluster": true
145141
}
146142
}
@@ -181,7 +177,6 @@
181177
"pipeline": [
182178
{
183179
"$changeStream": {
184-
"fullDocument": "default",
185180
"allChangesForCluster": true
186181
}
187182
}
@@ -198,7 +193,6 @@
198193
"pipeline": [
199194
{
200195
"$changeStream": {
201-
"fullDocument": "default",
202196
"allChangesForCluster": true
203197
}
204198
}

test/spec/retryable-reads/changeStreams-client.watch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ tests:
2525
command:
2626
aggregate: 1
2727
cursor: {}
28-
pipeline: [ { $changeStream: { fullDocument: "default", "allChangesForCluster": true } } ]
28+
pipeline: [ { $changeStream: { "allChangesForCluster": true } } ]
2929
database_name: admin
3030
-
3131
description: "client.watch succeeds on second attempt"

0 commit comments

Comments
 (0)