Skip to content

Commit a25df07

Browse files
committed
PYTHON-5202 Add spec test
1 parent 189923f commit a25df07

File tree

1 file changed

+173
-0
lines changed

1 file changed

+173
-0
lines changed

test/csot/waitQueueTimeout.json

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
{
2+
"description": "WaitQueueTimeoutError does not clear the pool",
3+
"schemaVersion": "1.9",
4+
"runOnRequirements": [
5+
{
6+
"minServerVersion": "4.4",
7+
"topologies": [
8+
"replicaset",
9+
"sharded"
10+
]
11+
}
12+
],
13+
"createEntities": [
14+
{
15+
"client": {
16+
"id": "failPointClient",
17+
"useMultipleMongoses": false
18+
}
19+
},
20+
{
21+
"client": {
22+
"id": "client",
23+
"uriOptions": {
24+
"maxPoolSize": 1
25+
},
26+
"useMultipleMongoses": false,
27+
"observeEvents": [
28+
"commandStartedEvent",
29+
"poolClearedEvent"
30+
]
31+
}
32+
},
33+
{
34+
"database": {
35+
"id": "database",
36+
"client": "client",
37+
"databaseName": "test"
38+
}
39+
}
40+
],
41+
"tests": [
42+
{
43+
"description": "WaitQueueTimeoutError does not clear the pool",
44+
"operations": [
45+
{
46+
"name": "failPoint",
47+
"object": "testRunner",
48+
"arguments": {
49+
"client": "failPointClient",
50+
"failPoint": {
51+
"configureFailPoint": "failCommand",
52+
"mode": {
53+
"times": 10
54+
},
55+
"data": {
56+
"failCommands": [
57+
"ping"
58+
],
59+
"blockConnection": true,
60+
"blockTimeMS": 500
61+
}
62+
}
63+
}
64+
},
65+
{
66+
"name": "createEntities",
67+
"object": "testRunner",
68+
"arguments": {
69+
"entities": [
70+
{
71+
"thread": {
72+
"id": "thread0"
73+
}
74+
}
75+
]
76+
}
77+
},
78+
{
79+
"name": "runOnThread",
80+
"object": "testRunner",
81+
"arguments": {
82+
"thread": "thread0",
83+
"operation": {
84+
"name": "runCommand",
85+
"object": "database",
86+
"arguments": {
87+
"command": {
88+
"ping": 1
89+
},
90+
"commandName": "ping"
91+
}
92+
}
93+
}
94+
},
95+
{
96+
"name": "waitForEvent",
97+
"object": "testRunner",
98+
"arguments": {
99+
"client": "client",
100+
"event": {
101+
"commandStartedEvent": {
102+
"commandName": "ping"
103+
}
104+
},
105+
"count": 1
106+
}
107+
},
108+
{
109+
"name": "runCommand",
110+
"object": "database",
111+
"arguments": {
112+
"timeoutMS": 200,
113+
"command": {
114+
"hello": 1
115+
},
116+
"commandName": "hello"
117+
},
118+
"expectError": {
119+
"isTimeoutError": true
120+
}
121+
},
122+
{
123+
"name": "waitForThread",
124+
"object": "testRunner",
125+
"arguments": {
126+
"thread": "thread0"
127+
}
128+
},
129+
{
130+
"name": "runCommand",
131+
"object": "database",
132+
"arguments": {
133+
"command": {
134+
"hello": 1
135+
},
136+
"commandName": "hello"
137+
}
138+
}
139+
],
140+
"expectEvents": [
141+
{
142+
"client": "client",
143+
"eventType": "command",
144+
"events": [
145+
{
146+
"commandStartedEvent": {
147+
"commandName": "ping",
148+
"databaseName": "test",
149+
"command": {
150+
"ping": 1
151+
}
152+
}
153+
},
154+
{
155+
"commandStartedEvent": {
156+
"commandName": "hello",
157+
"databaseName": "test",
158+
"command": {
159+
"hello": 1
160+
}
161+
}
162+
}
163+
]
164+
},
165+
{
166+
"client": "client",
167+
"eventType": "cmap",
168+
"events": []
169+
}
170+
]
171+
}
172+
]
173+
}

0 commit comments

Comments
 (0)