Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DRIVERS-1555: Test that isClientError considers network errors #1720

Merged
merged 2 commits into from
Nov 4, 2024
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
2 changes: 1 addition & 1 deletion source/crud/tests/unified/estimatedDocumentCount.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion source/crud/tests/unified/estimatedDocumentCount.yml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ tests:
- name: estimatedDocumentCount
object: *collection0
expectError:
isError: true
isClientError: true
expectEvents:
- client: *client0
events:
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ tests:
object: *collection1
name: estimatedDocumentCount
expectError:
isError: true
isClientError: true
expectEvents:
-
client: *client1
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
description: "expectedError-isClientError"

schemaVersion: "1.3"

runOnRequirements:
- minServerVersion: "4.0"
topologies: [single, replicaset]
- minServerVersion: "4.1.7"
topologies: [sharded, load-balanced]

createEntities:
- client:
id: &client0 client0
useMultipleMongoses: false
- database:
id: &database0 database0
client: *client0
databaseName: &database0Name test

tests:
- description: "isClientError considers network errors"
operations:
- name: failPoint
object: testRunner
arguments:
client: *client0
failPoint:
configureFailPoint: failCommand
mode: { times: 1 }
data:
failCommands: [ ping ]
closeConnection: true
- name: runCommand
object: *database0
arguments:
commandName: ping
command: { ping: 1 }
expectError:
isClientError: true
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note: per DRIVERS-1555, at least the Go driver will require test runner changes to pass this assertion.

Loading