Skip to content

Commit

Permalink
RUBY-3361 resync specs (#2818)
Browse files Browse the repository at this point in the history
  • Loading branch information
jamis authored Jan 9, 2024
1 parent f18c409 commit e06e03a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ description: "retryable-writes bulkWrite serverErrors"
schemaVersion: "1.0"

runOnRequirements:
- minServerVersion: "3.6"
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.7"
topologies: [ sharded ]

createEntities:
- client:
Expand All @@ -29,11 +31,6 @@ initialData:

tests:
- description: "BulkWrite succeeds after retryable writeConcernError in first batch"
runOnRequirements:
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.7"
topologies: [ sharded ]
operations:
- name: failPoint
object: testRunner
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ description: "retryable-writes insertOne serverErrors"
schemaVersion: "1.0"

runOnRequirements:
- minServerVersion: "3.6"
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.7"
topologies: [ sharded ]

createEntities:
- client:
Expand All @@ -29,11 +31,6 @@ initialData:

tests:
- description: "InsertOne succeeds after retryable writeConcernError"
runOnRequirements:
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.7"
topologies: [ sharded ]
operations:
- name: failPoint
object: testRunner
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_tests/data/unified/valid-pass/poc-crud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ tests:
- description: "readConcern majority with out stage"
runOnRequirements:
- minServerVersion: "4.1.0"
topologies: [ replicaset, sharded-replicaset ]
topologies: [ replicaset, sharded ]
serverless: "forbid"
operations:
- name: aggregate
Expand Down
14 changes: 7 additions & 7 deletions spec/spec_tests/data/unified/valid-pass/poc-retryable-writes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ description: "poc-retryable-writes"

schemaVersion: "1.0"

runOnRequirements:
- minServerVersion: "3.6"
topologies: [ replicaset ]

createEntities:
- client:
id: &client0 client0
Expand Down Expand Up @@ -42,6 +38,9 @@ initialData:

tests:
- description: "FindOneAndUpdate is committed on first attempt"
runOnRequirements: &onPrimaryTransactionalWrite_requirements
- minServerVersion: "3.6"
topologies: [ replicaset ]
operations:
- name: failPoint
object: testRunner
Expand All @@ -65,6 +64,7 @@ tests:
- { _id: 2, x: 22 }

- description: "FindOneAndUpdate is not committed on first attempt"
runOnRequirements: *onPrimaryTransactionalWrite_requirements
operations:
- name: failPoint
object: testRunner
Expand All @@ -89,6 +89,7 @@ tests:
- { _id: 2, x: 22 }

- description: "FindOneAndUpdate is never committed"
runOnRequirements: *onPrimaryTransactionalWrite_requirements
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -117,9 +118,7 @@ tests:
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.7"
# Original test uses "sharded", but retryable writes requires a sharded
# cluster backed by replica sets
topologies: [ sharded-replicaset ]
topologies: [ sharded ]
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -192,6 +191,7 @@ tests:
mode: { times: 2 }
data:
failCommands: [ insert ]
errorLabels: [ RetryableWriteError ]
writeConcernError:
code: 91 # ShutdownInProgress
errmsg: "Replication is being shut down"
Expand Down
7 changes: 3 additions & 4 deletions spec/spec_tests/data/unified/valid-pass/poc-sessions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,12 +125,11 @@ tests:
- description: "Dirty explicit session is discarded"
skipReason: RUBY-1813
# Original test specified retryWrites=true, but that is now the default.
# Retryable writes will require a sharded-replicaset, though.
runOnRequirements:
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.8"
topologies: [ sharded-replicaset ]
topologies: [ sharded ]
operations:
- name: failPoint
object: testRunner
Expand Down Expand Up @@ -181,7 +180,7 @@ tests:
- commandStartedEvent: &insert_attempt
command:
insert: *collection0Name
documents:
documents:
- { _id: 2 }
ordered: true
lsid: { $$sessionLsid: *session0 }
Expand All @@ -192,7 +191,7 @@ tests:
- commandStartedEvent:
command:
insert: *collection0Name
documents:
documents:
- { _id: 3 }
ordered: true
lsid: { $$sessionLsid: *session0 }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runOnRequirements:
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.8"
topologies: [ sharded-replicaset ]
topologies: [ sharded ]

createEntities:
- client:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ schemaVersion: "1.0"

runOnRequirements:
- minServerVersion: "4.1.8"
topologies: [ sharded-replicaset ]
topologies: [ sharded ]

createEntities:
- client:
Expand Down
6 changes: 3 additions & 3 deletions spec/spec_tests/data/unified/valid-pass/poc-transactions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runOnRequirements:
- minServerVersion: "4.0"
topologies: [ replicaset ]
- minServerVersion: "4.1.8"
topologies: [ sharded-replicaset ]
topologies: [ sharded ]

createEntities:
- client:
Expand Down Expand Up @@ -51,7 +51,7 @@ tests:
- description: "explicitly create collection using create command"
runOnRequirements:
- minServerVersion: "4.3.4"
topologies: [ replicaset, sharded-replicaset ]
topologies: [ replicaset, sharded ]
operations:
- name: dropCollection
object: *database0
Expand Down Expand Up @@ -109,7 +109,7 @@ tests:
- description: "create index on a non-existing collection"
runOnRequirements:
- minServerVersion: "4.3.4"
topologies: [ replicaset, sharded-replicaset ]
topologies: [ replicaset, sharded ]
operations:
- name: dropCollection
object: *database0
Expand Down

0 comments on commit e06e03a

Please sign in to comment.