1{
2 "runOn": [
3 {
4 "minServerVersion": "4.4"
5 }
6 ],
7 "database_name": "sdam-tests",
8 "collection_name": "find-network-error",
9 "data": [
10 {
11 "_id": 1
12 },
13 {
14 "_id": 2
15 }
16 ],
17 "tests": [
18 {
19 "description": "Reset server and pool after network error on find",
20 "failPoint": {
21 "configureFailPoint": "failCommand",
22 "mode": {
23 "times": 1
24 },
25 "data": {
26 "failCommands": [
27 "find"
28 ],
29 "closeConnection": true,
30 "appName": "findNetworkErrorTest"
31 }
32 },
33 "clientOptions": {
34 "retryWrites": false,
35 "retryReads": false,
36 "appname": "findNetworkErrorTest"
37 },
38 "operations": [
39 {
40 "name": "find",
41 "object": "collection",
42 "arguments": {
43 "filter": {
44 "_id": 1
45 }
46 },
47 "error": true
48 },
49 {
50 "name": "waitForEvent",
51 "object": "testRunner",
52 "arguments": {
53 "event": "ServerMarkedUnknownEvent",
54 "count": 1
55 }
56 },
57 {
58 "name": "waitForEvent",
59 "object": "testRunner",
60 "arguments": {
61 "event": "PoolClearedEvent",
62 "count": 1
63 }
64 },
65 {
66 "name": "insertMany",
67 "object": "collection",
68 "arguments": {
69 "documents": [
70 {
71 "_id": 5
72 },
73 {
74 "_id": 6
75 }
76 ]
77 }
78 },
79 {
80 "name": "assertEventCount",
81 "object": "testRunner",
82 "arguments": {
83 "event": "ServerMarkedUnknownEvent",
84 "count": 1
85 }
86 },
87 {
88 "name": "assertEventCount",
89 "object": "testRunner",
90 "arguments": {
91 "event": "PoolClearedEvent",
92 "count": 1
93 }
94 }
95 ],
96 "expectations": [
97 {
98 "command_started_event": {
99 "command": {
100 "find": "find-network-error"
101 },
102 "command_name": "find",
103 "database_name": "sdam-tests"
104 }
105 },
106 {
107 "command_started_event": {
108 "command": {
109 "insert": "find-network-error",
110 "documents": [
111 {
112 "_id": 5
113 },
114 {
115 "_id": 6
116 }
117 ]
118 },
119 "command_name": "insert",
120 "database_name": "sdam-tests"
121 }
122 }
123 ],
124 "outcome": {
125 "collection": {
126 "data": [
127 {
128 "_id": 1
129 },
130 {
131 "_id": 2
132 },
133 {
134 "_id": 5
135 },
136 {
137 "_id": 6
138 }
139 ]
140 }
141 }
142 }
143 ]
144}
View as plain text