Skip to content

Commit 95e1752

Browse files
jamiscomandeo-mongo
authored andcommitted
RUBY-3361 resync specs (mongodb#2818)
1 parent 20d16a7 commit 95e1752

8 files changed

+22
-29
lines changed

spec/spec_tests/data/retryable_writes/unified/bulkWrite-serverErrors.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ description: "retryable-writes bulkWrite serverErrors"
33
schemaVersion: "1.0"
44

55
runOnRequirements:
6-
- minServerVersion: "3.6"
6+
- minServerVersion: "4.0"
77
topologies: [ replicaset ]
8+
- minServerVersion: "4.1.7"
9+
topologies: [ sharded ]
810

911
createEntities:
1012
- client:
@@ -29,11 +31,6 @@ initialData:
2931

3032
tests:
3133
- description: "BulkWrite succeeds after retryable writeConcernError in first batch"
32-
runOnRequirements:
33-
- minServerVersion: "4.0"
34-
topologies: [ replicaset ]
35-
- minServerVersion: "4.1.7"
36-
topologies: [ sharded ]
3734
operations:
3835
- name: failPoint
3936
object: testRunner

spec/spec_tests/data/retryable_writes/unified/insertOne-serverErrors.yml

+3-6
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ description: "retryable-writes insertOne serverErrors"
33
schemaVersion: "1.0"
44

55
runOnRequirements:
6-
- minServerVersion: "3.6"
6+
- minServerVersion: "4.0"
77
topologies: [ replicaset ]
8+
- minServerVersion: "4.1.7"
9+
topologies: [ sharded ]
810

911
createEntities:
1012
- client:
@@ -29,11 +31,6 @@ initialData:
2931

3032
tests:
3133
- description: "InsertOne succeeds after retryable writeConcernError"
32-
runOnRequirements:
33-
- minServerVersion: "4.0"
34-
topologies: [ replicaset ]
35-
- minServerVersion: "4.1.7"
36-
topologies: [ sharded ]
3734
operations:
3835
- name: failPoint
3936
object: testRunner

spec/spec_tests/data/unified/valid-pass/poc-crud.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ tests:
143143
- description: "readConcern majority with out stage"
144144
runOnRequirements:
145145
- minServerVersion: "4.1.0"
146-
topologies: [ replicaset, sharded-replicaset ]
146+
topologies: [ replicaset, sharded ]
147147
serverless: "forbid"
148148
operations:
149149
- name: aggregate

spec/spec_tests/data/unified/valid-pass/poc-retryable-writes.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ description: "poc-retryable-writes"
22

33
schemaVersion: "1.0"
44

5-
runOnRequirements:
6-
- minServerVersion: "3.6"
7-
topologies: [ replicaset ]
8-
95
createEntities:
106
- client:
117
id: &client0 client0
@@ -42,6 +38,9 @@ initialData:
4238

4339
tests:
4440
- description: "FindOneAndUpdate is committed on first attempt"
41+
runOnRequirements: &onPrimaryTransactionalWrite_requirements
42+
- minServerVersion: "3.6"
43+
topologies: [ replicaset ]
4544
operations:
4645
- name: failPoint
4746
object: testRunner
@@ -65,6 +64,7 @@ tests:
6564
- { _id: 2, x: 22 }
6665

6766
- description: "FindOneAndUpdate is not committed on first attempt"
67+
runOnRequirements: *onPrimaryTransactionalWrite_requirements
6868
operations:
6969
- name: failPoint
7070
object: testRunner
@@ -89,6 +89,7 @@ tests:
8989
- { _id: 2, x: 22 }
9090

9191
- description: "FindOneAndUpdate is never committed"
92+
runOnRequirements: *onPrimaryTransactionalWrite_requirements
9293
operations:
9394
- name: failPoint
9495
object: testRunner
@@ -117,9 +118,7 @@ tests:
117118
- minServerVersion: "4.0"
118119
topologies: [ replicaset ]
119120
- minServerVersion: "4.1.7"
120-
# Original test uses "sharded", but retryable writes requires a sharded
121-
# cluster backed by replica sets
122-
topologies: [ sharded-replicaset ]
121+
topologies: [ sharded ]
123122
operations:
124123
- name: failPoint
125124
object: testRunner
@@ -192,6 +191,7 @@ tests:
192191
mode: { times: 2 }
193192
data:
194193
failCommands: [ insert ]
194+
errorLabels: [ RetryableWriteError ]
195195
writeConcernError:
196196
code: 91 # ShutdownInProgress
197197
errmsg: "Replication is being shut down"

spec/spec_tests/data/unified/valid-pass/poc-sessions.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,11 @@ tests:
125125
- description: "Dirty explicit session is discarded"
126126
skipReason: RUBY-1813
127127
# Original test specified retryWrites=true, but that is now the default.
128-
# Retryable writes will require a sharded-replicaset, though.
129128
runOnRequirements:
130129
- minServerVersion: "4.0"
131130
topologies: [ replicaset ]
132131
- minServerVersion: "4.1.8"
133-
topologies: [ sharded-replicaset ]
132+
topologies: [ sharded ]
134133
operations:
135134
- name: failPoint
136135
object: testRunner
@@ -181,7 +180,7 @@ tests:
181180
- commandStartedEvent: &insert_attempt
182181
command:
183182
insert: *collection0Name
184-
documents:
183+
documents:
185184
- { _id: 2 }
186185
ordered: true
187186
lsid: { $$sessionLsid: *session0 }
@@ -192,7 +191,7 @@ tests:
192191
- commandStartedEvent:
193192
command:
194193
insert: *collection0Name
195-
documents:
194+
documents:
196195
- { _id: 3 }
197196
ordered: true
198197
lsid: { $$sessionLsid: *session0 }

spec/spec_tests/data/unified/valid-pass/poc-transactions-convenient-api.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runOnRequirements:
66
- minServerVersion: "4.0"
77
topologies: [ replicaset ]
88
- minServerVersion: "4.1.8"
9-
topologies: [ sharded-replicaset ]
9+
topologies: [ sharded ]
1010

1111
createEntities:
1212
- client:

spec/spec_tests/data/unified/valid-pass/poc-transactions-mongos-pin-auto.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ schemaVersion: "1.0"
44

55
runOnRequirements:
66
- minServerVersion: "4.1.8"
7-
topologies: [ sharded-replicaset ]
7+
topologies: [ sharded ]
88

99
createEntities:
1010
- client:

spec/spec_tests/data/unified/valid-pass/poc-transactions.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ runOnRequirements:
66
- minServerVersion: "4.0"
77
topologies: [ replicaset ]
88
- minServerVersion: "4.1.8"
9-
topologies: [ sharded-replicaset ]
9+
topologies: [ sharded ]
1010

1111
createEntities:
1212
- client:
@@ -51,7 +51,7 @@ tests:
5151
- description: "explicitly create collection using create command"
5252
runOnRequirements:
5353
- minServerVersion: "4.3.4"
54-
topologies: [ replicaset, sharded-replicaset ]
54+
topologies: [ replicaset, sharded ]
5555
operations:
5656
- name: dropCollection
5757
object: *database0
@@ -109,7 +109,7 @@ tests:
109109
- description: "create index on a non-existing collection"
110110
runOnRequirements:
111111
- minServerVersion: "4.3.4"
112-
topologies: [ replicaset, sharded-replicaset ]
112+
topologies: [ replicaset, sharded ]
113113
operations:
114114
- name: dropCollection
115115
object: *database0

0 commit comments

Comments
 (0)