File tree Expand file tree Collapse file tree 2 files changed +29
-5
lines changed
test/spec/client-side-operations-timeout Expand file tree Collapse file tree 2 files changed +29
-5
lines changed Original file line number Diff line number Diff line change 133133 }
134134 ],
135135 "operations" : [
136+ {
137+ "name" : " find" ,
138+ "object" : " collection" ,
139+ "arguments" : {
140+ "filter" : {
141+ "_id" : 0
142+ }
143+ },
144+ "expectResult" : []
145+ },
136146 {
137147 "name" : " failPoint" ,
138148 "object" : " testRunner" ,
174184 {
175185 "client" : " client" ,
176186 "events" : [
187+ {
188+ "commandStartedEvent" : {
189+ "commandName" : " find"
190+ }
191+ },
177192 {
178193 "commandStartedEvent" : {
179194 "commandName" : " find" ,
580595 ]
581596 }
582597 ]
583- }
598+ }
Original file line number Diff line number Diff line change @@ -70,7 +70,13 @@ tests:
7070 runOnRequirements :
7171 - serverless : forbid
7272 operations :
73- # Block find/getMore for 120ms.
73+ # pre-populate the pool with a connection
74+ - name : find
75+ object : collection
76+ arguments :
77+ filter : { _id: 0 }
78+ expectResult : []
79+ # Block find/getMore for 60ms.
7480 - name : failPoint
7581 object : testRunner
7682 arguments :
@@ -81,22 +87,25 @@ tests:
8187 data :
8288 failCommands : [find, getMore]
8389 blockConnection : true
84- blockTimeMS : 120
90+ blockTimeMS : 60
8591 # Run a find with timeoutMS less than double our failPoint blockTimeMS and
8692 # batchSize less than the total document count will cause a find and a
87- # getMore to be sent. Both will block for 120ms so together they will go
93+ # getMore to be sent. Both will block for 60ms so together they will go
8894 # over the timeout.
8995 - name : runCursorCommand
9096 object : *db
9197 arguments :
9298 commandName : find
93- timeoutMS : 200
99+ timeoutMS : 100
94100 command : { find: *collection, batchSize: 2 }
95101 expectError :
96102 isTimeoutError : true
97103 expectEvents :
98104 - client : *client
99105 events :
106+ # first find is from the initial find to populate the connection poo
107+ - commandStartedEvent :
108+ commandName : find
100109 - commandStartedEvent :
101110 commandName : find
102111 command :
You can’t perform that action at this time.
0 commit comments