Skip to content

Commit 75cee56

Browse files
committed
Add connectTimeoutMS specification test
JAVA-3766
1 parent 67f2b30 commit 75cee56

File tree

1 file changed

+148
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)