Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions spec/mongo/auth/user/view_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@
failCommands: [ failCommand ],
writeConcernError: {
code: 64,
codeName: 'WriteConcernFailed',
codeName: 'WriteConcernTimeout',
errmsg: 'waiting for replication timed out',
errInfo: { wtimeout: true }
}
Expand All @@ -494,7 +494,7 @@
expect(e.write_concern_error?).to be true
expect(e.write_concern_error_document).to eq(
'code' => 64,
'codeName' => 'WriteConcernFailed',
'codeName' => 'WriteConcernTimeout',
'errmsg' => 'waiting for replication timed out',
'errInfo' => { 'wtimeout' => true }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -480,15 +480,14 @@ tests:
- { _id: 2, x: 22 }
- { _id: 3, x: 33 } # The write was still applied.
-
description: "InsertOne fails after WriteConcernError WriteConcernFailed"
description: "InsertOne fails after WriteConcernError WriteConcernTimeout"
failPoint:
configureFailPoint: failCommand
mode: { times: 1 }
data:
failCommands: ["insert"]
writeConcernError:
code: 64
codeName: WriteConcernFailed
errmsg: waiting for replication timed out
errInfo: {wtimeout: True}
operation:
Expand Down
7 changes: 3 additions & 4 deletions spec/spec_tests/data/transactions/error-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -736,15 +736,15 @@ tests:
collection:
data: []

- description: add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed
- description: add UnknownTransactionCommitResult label to writeConcernError WriteConcernTimeout

failPoint:
configureFailPoint: failCommand
mode: { times: 1 }
data:
failCommands: ["commitTransaction"]
writeConcernError:
code: 64 # WriteConcernFailed without wtimeout
code: 64 # WriteConcernTimeout without wtimeout
errmsg: multiple errors reported

operations:
Expand Down Expand Up @@ -816,7 +816,7 @@ tests:
data:
- _id: 1

- description: add UnknownTransactionCommitResult label to writeConcernError WriteConcernFailed with wtimeout
- description: add UnknownTransactionCommitResult label to writeConcernError WriteConcernTimeout with wtimeout

failPoint:
configureFailPoint: failCommand
Expand All @@ -825,7 +825,6 @@ tests:
failCommands: ["commitTransaction"]
writeConcernError:
code: 64
codeName: WriteConcernFailed
errmsg: waiting for replication timed out
errInfo: {wtimeout: True}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ data: []

tests:
-
description: commitTransaction is retried after WriteConcernFailed timeout error
description: commitTransaction is retried after WriteConcernTimeout timeout error
failPoint:
configureFailPoint: failCommand
mode: { times: 2 }
Expand All @@ -23,7 +23,6 @@ tests:
# with writeConcernError (see: SERVER-39292)
writeConcernError:
code: 64
codeName: WriteConcernFailed
errmsg: "waiting for replication timed out"
errInfo: { wtimeout: true }
operations:
Expand Down Expand Up @@ -106,10 +105,10 @@ tests:
- { _id: 1 }
-
# This test configures the fail point to return an error with the
# WriteConcernFailed code but without errInfo that would identify it as a
# WriteConcernTimeout code but without errInfo that would identify it as a
# wtimeout error. This tests that drivers do not assume that all
# WriteConcernFailed errors are due to a replication timeout.
description: commitTransaction is retried after WriteConcernFailed non-timeout error
# WriteConcernTimeout errors are due to a replication timeout.
description: commitTransaction is retried after WriteConcernTimeout non-timeout error
failPoint:
configureFailPoint: failCommand
mode: { times: 2 }
Expand All @@ -119,7 +118,6 @@ tests:
# with writeConcernError (see: SERVER-39292)
writeConcernError:
code: 64
codeName: WriteConcernFailed
errmsg: "multiple errors reported"
operations:
- *operation
Expand Down
Loading