@@ -245,8 +245,10 @@ def test_max_await_time_ms(self):
245
245
list (coll .find (
246
246
cursor_type = CursorType .TAILABLE_AWAIT ).max_await_time_ms (99 ))
247
247
# find
248
+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
248
249
self .assertFalse ('maxTimeMS' in results ['started' ][0 ].command )
249
250
# getMore
251
+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
250
252
self .assertTrue ('maxTimeMS' in results ['started' ][1 ].command )
251
253
self .assertEqual (99 , results ['started' ][1 ].command ['maxTimeMS' ])
252
254
results .clear ()
@@ -255,9 +257,11 @@ def test_max_await_time_ms(self):
255
257
list (coll .find (
256
258
cursor_type = CursorType .TAILABLE_AWAIT ).max_time_ms (1 ))
257
259
# find
260
+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
258
261
self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
259
262
self .assertEqual (1 , results ['started' ][0 ].command ['maxTimeMS' ])
260
263
# getMore
264
+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
261
265
self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
262
266
results .clear ()
263
267
@@ -266,35 +270,43 @@ def test_max_await_time_ms(self):
266
270
cursor_type = CursorType .TAILABLE_AWAIT ).max_time_ms (
267
271
1 ).max_await_time_ms (99 ))
268
272
# find
273
+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
269
274
self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
270
275
self .assertEqual (1 , results ['started' ][0 ].command ['maxTimeMS' ])
271
276
# getMore
277
+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
272
278
self .assertTrue ('maxTimeMS' in results ['started' ][1 ].command )
273
279
self .assertEqual (99 , results ['started' ][1 ].command ['maxTimeMS' ])
274
280
results .clear ()
275
281
276
282
# Non tailable_await with max_await_time_ms
277
283
list (coll .find (batch_size = 1 ).max_await_time_ms (99 ))
278
284
# find
285
+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
279
286
self .assertFalse ('maxTimeMS' in results ['started' ][0 ].command )
280
287
# getMore
288
+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
281
289
self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
282
290
results .clear ()
283
291
284
292
# Non tailable_await with max_time_ms
285
293
list (coll .find (batch_size = 1 ).max_time_ms (99 ))
286
294
# find
295
+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
287
296
self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
288
297
self .assertEqual (99 , results ['started' ][0 ].command ['maxTimeMS' ])
289
298
# getMore
299
+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
290
300
self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
291
301
292
302
# Non tailable_await with both max_time_ms and max_await_time_ms
293
303
list (coll .find (batch_size = 1 ).max_time_ms (99 ).max_await_time_ms (88 ))
294
304
# find
305
+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
295
306
self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
296
307
self .assertEqual (99 , results ['started' ][0 ].command ['maxTimeMS' ])
297
308
# getMore
309
+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
298
310
self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
299
311
300
312
finally :
0 commit comments