Skip to content

Commit 0535e65

Browse files
authored
DRIVERS-3419 - Test that client backpressure retries do not block oth… (#1911)
1 parent 66317ed commit 0535e65

File tree

2 files changed

+196
-0
lines changed

2 files changed

+196
-0
lines changed
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"description": "tests that connections are returned to the pool on retry attempts for overload errors",
3+
"schemaVersion": "1.3",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "4.4",
7+
"topologies": [
8+
"replicaset",
9+
"sharded",
10+
"load-balanced"
11+
]
12+
}
13+
],
14+
"createEntities": [
15+
{
16+
"client": {
17+
"id": "client",
18+
"useMultipleMongoses": false,
19+
"observeEvents": [
20+
"connectionCheckedOutEvent",
21+
"connectionCheckedInEvent"
22+
]
23+
}
24+
},
25+
{
26+
"client": {
27+
"id": "fail_point_client",
28+
"useMultipleMongoses": false
29+
}
30+
},
31+
{
32+
"database": {
33+
"id": "database",
34+
"client": "client",
35+
"databaseName": "backpressure-connection-checkin"
36+
}
37+
},
38+
{
39+
"collection": {
40+
"id": "collection",
41+
"database": "database",
42+
"collectionName": "coll"
43+
}
44+
}
45+
],
46+
"tests": [
47+
{
48+
"description": "overload error retry attempts return connections to the pool",
49+
"operations": [
50+
{
51+
"name": "failPoint",
52+
"object": "testRunner",
53+
"arguments": {
54+
"client": "fail_point_client",
55+
"failPoint": {
56+
"configureFailPoint": "failCommand",
57+
"mode": "alwaysOn",
58+
"data": {
59+
"failCommands": [
60+
"find"
61+
],
62+
"errorLabels": [
63+
"RetryableError",
64+
"SystemOverloadedError"
65+
],
66+
"errorCode": 2
67+
}
68+
}
69+
}
70+
},
71+
{
72+
"name": "find",
73+
"object": "collection",
74+
"arguments": {
75+
"filter": {}
76+
},
77+
"expectError": {
78+
"isError": true,
79+
"isClientError": false
80+
}
81+
}
82+
],
83+
"expectEvents": [
84+
{
85+
"client": "client",
86+
"eventType": "cmap",
87+
"events": [
88+
{
89+
"connectionCheckedOutEvent": {}
90+
},
91+
{
92+
"connectionCheckedInEvent": {}
93+
},
94+
{
95+
"connectionCheckedOutEvent": {}
96+
},
97+
{
98+
"connectionCheckedInEvent": {}
99+
},
100+
{
101+
"connectionCheckedOutEvent": {}
102+
},
103+
{
104+
"connectionCheckedInEvent": {}
105+
},
106+
{
107+
"connectionCheckedOutEvent": {}
108+
},
109+
{
110+
"connectionCheckedInEvent": {}
111+
},
112+
{
113+
"connectionCheckedOutEvent": {}
114+
},
115+
{
116+
"connectionCheckedInEvent": {}
117+
},
118+
{
119+
"connectionCheckedOutEvent": {}
120+
},
121+
{
122+
"connectionCheckedInEvent": {}
123+
}
124+
]
125+
}
126+
]
127+
}
128+
]
129+
}
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
description: tests that connections are returned to the pool on retry attempts for overload errors
2+
schemaVersion: "1.3"
3+
runOnRequirements:
4+
- minServerVersion: "4.4"
5+
topologies:
6+
- replicaset
7+
- sharded
8+
- load-balanced
9+
createEntities:
10+
- client:
11+
id: client
12+
useMultipleMongoses: false
13+
observeEvents:
14+
- connectionCheckedOutEvent
15+
- connectionCheckedInEvent
16+
- client:
17+
id: fail_point_client
18+
useMultipleMongoses: false
19+
- database:
20+
id: database
21+
client: client
22+
databaseName: backpressure-connection-checkin
23+
- collection:
24+
id: collection
25+
database: database
26+
collectionName: coll
27+
tests:
28+
- description: overload error retry attempts return connections to the pool
29+
operations:
30+
- name: failPoint
31+
object: testRunner
32+
arguments:
33+
client: fail_point_client
34+
failPoint:
35+
configureFailPoint: failCommand
36+
mode: alwaysOn
37+
data:
38+
failCommands:
39+
- find
40+
errorLabels:
41+
- RetryableError
42+
- SystemOverloadedError
43+
errorCode: 2
44+
- name: find
45+
object: collection
46+
arguments:
47+
filter: {}
48+
expectError:
49+
isError: true
50+
isClientError: false
51+
expectEvents:
52+
- client: client
53+
eventType: cmap
54+
events:
55+
- connectionCheckedOutEvent: {}
56+
- connectionCheckedInEvent: {}
57+
- connectionCheckedOutEvent: {}
58+
- connectionCheckedInEvent: {}
59+
- connectionCheckedOutEvent: {}
60+
- connectionCheckedInEvent: {}
61+
- connectionCheckedOutEvent: {}
62+
- connectionCheckedInEvent: {}
63+
- connectionCheckedOutEvent: {}
64+
- connectionCheckedInEvent: {}
65+
- connectionCheckedOutEvent: {}
66+
- connectionCheckedInEvent: {}
67+

0 commit comments

Comments
 (0)