Skip to content

Commit e52ecdf

Browse files
committed
wip update tests
1 parent 546976d commit e52ecdf

File tree

1 file changed

+166
-0
lines changed

1 file changed

+166
-0
lines changed
Lines changed: 166 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,166 @@
1+
{
2+
"description": "auth-network-error-fail",
3+
"schemaVersion": "1.4",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "4.4",
7+
"auth": true,
8+
"serverless": "forbid",
9+
"topologies": [
10+
"single",
11+
"replicaset",
12+
"sharded"
13+
]
14+
}
15+
],
16+
"createEntities": [
17+
{
18+
"client": {
19+
"id": "setupClient",
20+
"useMultipleMongoses": false
21+
}
22+
}
23+
],
24+
"initialData": [
25+
{
26+
"collectionName": "auth-network-error-fail",
27+
"databaseName": "sdam-tests",
28+
"documents": [
29+
{
30+
"_id": 1
31+
},
32+
{
33+
"_id": 2
34+
}
35+
]
36+
}
37+
],
38+
"tests": [
39+
{
40+
"description": "Backoff and fail after network connection error during authentication",
41+
"operations": [
42+
{
43+
"name": "failPoint",
44+
"object": "testRunner",
45+
"arguments": {
46+
"client": "setupClient",
47+
"failPoint": {
48+
"configureFailPoint": "failCommand",
49+
"mode": {
50+
"times": 6
51+
},
52+
"data": {
53+
"failCommands": [
54+
"saslContinue"
55+
],
56+
"appName": "authNetworkErrorFailTest",
57+
"closeConnection": true
58+
}
59+
}
60+
}
61+
},
62+
{
63+
"name": "createEntities",
64+
"object": "testRunner",
65+
"arguments": {
66+
"entities": [
67+
{
68+
"client": {
69+
"id": "client",
70+
"useMultipleMongoses": false,
71+
"observeEvents": [
72+
"commandStartedEvent",
73+
"poolBackoffEvent",
74+
"poolReadyEvent",
75+
"poolClearEvent"
76+
],
77+
"uriOptions": {
78+
"retryWrites": false,
79+
"appname": "authNetworkErrorFailTest"
80+
}
81+
}
82+
},
83+
{
84+
"database": {
85+
"id": "database",
86+
"client": "client",
87+
"databaseName": "sdam-tests"
88+
}
89+
},
90+
{
91+
"collection": {
92+
"id": "collection",
93+
"database": "database",
94+
"collectionName": "auth-network-error-fail"
95+
}
96+
}
97+
]
98+
}
99+
},
100+
{
101+
"name": "insertMany",
102+
"object": "collection",
103+
"arguments": {
104+
"documents": [
105+
{
106+
"_id": 3
107+
},
108+
{
109+
"_id": 4
110+
}
111+
]
112+
},
113+
"expectError": {
114+
"isError": true
115+
}
116+
}
117+
],
118+
"expectEvents": [
119+
{
120+
"client": "client",
121+
"eventType": "command",
122+
"events": []
123+
},
124+
{
125+
"client": "client",
126+
"eventType": "cmap",
127+
"events": [
128+
{
129+
"poolReadyEvent": {}
130+
},
131+
{
132+
"poolBackoffEvent": {
133+
"attempt": 1
134+
}
135+
},
136+
{
137+
"poolBackoffEvent": {
138+
"attempt": 2
139+
}
140+
},
141+
{
142+
"poolBackoffEvent": {
143+
"attempt": 3
144+
}
145+
},
146+
{
147+
"poolBackoffEvent": {
148+
"attempt": 4
149+
}
150+
},
151+
{
152+
"poolBackoffEvent": {
153+
"attempt": 5
154+
}
155+
},
156+
{
157+
"poolBackoffEvent": {
158+
"attempt": 6
159+
}
160+
}
161+
]
162+
}
163+
]
164+
}
165+
]
166+
}

0 commit comments

Comments
 (0)