PYTHON-4942 & PYTHON-4936 Test that isClientError considers network errors and operations may be an empty array (#2236)
This commit is contained in:
parent
33843d285b
commit
0c6f84642c
@ -195,7 +195,7 @@
|
||||
"object": "collection1",
|
||||
"name": "estimatedDocumentCount",
|
||||
"expectError": {
|
||||
"isError": true
|
||||
"isClientError": true
|
||||
}
|
||||
}
|
||||
],
|
||||
@ -241,7 +241,7 @@
|
||||
"object": "collection0",
|
||||
"name": "estimatedDocumentCount",
|
||||
"expectError": {
|
||||
"isError": true
|
||||
"isClientError": true
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@ -0,0 +1,74 @@
|
||||
{
|
||||
"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",
|
||||
"useMultipleMongoses": false
|
||||
}
|
||||
},
|
||||
{
|
||||
"database": {
|
||||
"id": "database0",
|
||||
"client": "client0",
|
||||
"databaseName": "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
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -0,0 +1,10 @@
|
||||
{
|
||||
"description": "operation-empty_array",
|
||||
"schemaVersion": "1.0",
|
||||
"tests": [
|
||||
{
|
||||
"description": "Empty operations array",
|
||||
"operations": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user