Skip to content

Commit 32b3e34

Browse files
authoredMar 27, 2025
test(NODE-6500): sync UTR isClientError asserts true for network errors tests (#4492)
1 parent cfdb8ec commit 32b3e34

File tree

6 files changed

+118
-5
lines changed

6 files changed

+118
-5
lines changed
 

Diff for: ‎test/spec/crud/unified/estimatedDocumentCount.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@
249249
"name": "estimatedDocumentCount",
250250
"object": "collection0",
251251
"expectError": {
252-
"isError": true
252+
"isClientError": true
253253
}
254254
}
255255
],

Diff for: ‎test/spec/crud/unified/estimatedDocumentCount.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ tests:
130130
- name: estimatedDocumentCount
131131
object: *collection0
132132
expectError:
133-
isError: true
133+
isClientError: true
134134
expectEvents:
135135
- client: *client0
136136
events:

Diff for: ‎test/spec/retryable-reads/unified/estimatedDocumentCount.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@
195195
"object": "collection1",
196196
"name": "estimatedDocumentCount",
197197
"expectError": {
198-
"isError": true
198+
"isClientError": true
199199
}
200200
}
201201
],
@@ -241,7 +241,7 @@
241241
"object": "collection0",
242242
"name": "estimatedDocumentCount",
243243
"expectError": {
244-
"isError": true
244+
"isClientError": true
245245
}
246246
}
247247
],

Diff for: ‎test/spec/retryable-reads/unified/estimatedDocumentCount.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ tests:
116116
object: *collection1
117117
name: estimatedDocumentCount
118118
expectError:
119-
isError: true
119+
isClientError: true
120120
expectEvents:
121121
-
122122
client: *client1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"description": "expectedError-isClientError",
3+
"schemaVersion": "1.3",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "4.0",
7+
"topologies": [
8+
"single",
9+
"replicaset"
10+
]
11+
},
12+
{
13+
"minServerVersion": "4.1.7",
14+
"topologies": [
15+
"sharded",
16+
"load-balanced"
17+
]
18+
}
19+
],
20+
"createEntities": [
21+
{
22+
"client": {
23+
"id": "client0",
24+
"useMultipleMongoses": false
25+
}
26+
},
27+
{
28+
"database": {
29+
"id": "database0",
30+
"client": "client0",
31+
"databaseName": "test"
32+
}
33+
}
34+
],
35+
"tests": [
36+
{
37+
"description": "isClientError considers network errors",
38+
"operations": [
39+
{
40+
"name": "failPoint",
41+
"object": "testRunner",
42+
"arguments": {
43+
"client": "client0",
44+
"failPoint": {
45+
"configureFailPoint": "failCommand",
46+
"mode": {
47+
"times": 1
48+
},
49+
"data": {
50+
"failCommands": [
51+
"ping"
52+
],
53+
"closeConnection": true
54+
}
55+
}
56+
}
57+
},
58+
{
59+
"name": "runCommand",
60+
"object": "database0",
61+
"arguments": {
62+
"commandName": "ping",
63+
"command": {
64+
"ping": 1
65+
}
66+
},
67+
"expectError": {
68+
"isClientError": true
69+
}
70+
}
71+
]
72+
}
73+
]
74+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
description: "expectedError-isClientError"
2+
3+
schemaVersion: "1.3"
4+
5+
runOnRequirements:
6+
- minServerVersion: "4.0"
7+
topologies: [single, replicaset]
8+
- minServerVersion: "4.1.7"
9+
topologies: [sharded, load-balanced]
10+
11+
createEntities:
12+
- client:
13+
id: &client0 client0
14+
useMultipleMongoses: false
15+
- database:
16+
id: &database0 database0
17+
client: *client0
18+
databaseName: &database0Name test
19+
20+
tests:
21+
- description: "isClientError considers network errors"
22+
operations:
23+
- name: failPoint
24+
object: testRunner
25+
arguments:
26+
client: *client0
27+
failPoint:
28+
configureFailPoint: failCommand
29+
mode: { times: 1 }
30+
data:
31+
failCommands: [ ping ]
32+
closeConnection: true
33+
- name: runCommand
34+
object: *database0
35+
arguments:
36+
commandName: ping
37+
command: { ping: 1 }
38+
expectError:
39+
isClientError: true

0 commit comments

Comments
 (0)