@@ -245,8 +245,10 @@ def test_max_await_time_ms(self):
245245 list (coll .find (
246246 cursor_type = CursorType .TAILABLE_AWAIT ).max_await_time_ms (99 ))
247247 # find
248+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
248249 self .assertFalse ('maxTimeMS' in results ['started' ][0 ].command )
249250 # getMore
251+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
250252 self .assertTrue ('maxTimeMS' in results ['started' ][1 ].command )
251253 self .assertEqual (99 , results ['started' ][1 ].command ['maxTimeMS' ])
252254 results .clear ()
@@ -255,9 +257,11 @@ def test_max_await_time_ms(self):
255257 list (coll .find (
256258 cursor_type = CursorType .TAILABLE_AWAIT ).max_time_ms (1 ))
257259 # find
260+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
258261 self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
259262 self .assertEqual (1 , results ['started' ][0 ].command ['maxTimeMS' ])
260263 # getMore
264+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
261265 self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
262266 results .clear ()
263267
@@ -266,35 +270,43 @@ def test_max_await_time_ms(self):
266270 cursor_type = CursorType .TAILABLE_AWAIT ).max_time_ms (
267271 1 ).max_await_time_ms (99 ))
268272 # find
273+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
269274 self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
270275 self .assertEqual (1 , results ['started' ][0 ].command ['maxTimeMS' ])
271276 # getMore
277+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
272278 self .assertTrue ('maxTimeMS' in results ['started' ][1 ].command )
273279 self .assertEqual (99 , results ['started' ][1 ].command ['maxTimeMS' ])
274280 results .clear ()
275281
276282 # Non tailable_await with max_await_time_ms
277283 list (coll .find (batch_size = 1 ).max_await_time_ms (99 ))
278284 # find
285+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
279286 self .assertFalse ('maxTimeMS' in results ['started' ][0 ].command )
280287 # getMore
288+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
281289 self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
282290 results .clear ()
283291
284292 # Non tailable_await with max_time_ms
285293 list (coll .find (batch_size = 1 ).max_time_ms (99 ))
286294 # find
295+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
287296 self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
288297 self .assertEqual (99 , results ['started' ][0 ].command ['maxTimeMS' ])
289298 # getMore
299+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
290300 self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
291301
292302 # Non tailable_await with both max_time_ms and max_await_time_ms
293303 list (coll .find (batch_size = 1 ).max_time_ms (99 ).max_await_time_ms (88 ))
294304 # find
305+ self .assertEqual ('find' , results ['started' ][0 ].command_name )
295306 self .assertTrue ('maxTimeMS' in results ['started' ][0 ].command )
296307 self .assertEqual (99 , results ['started' ][0 ].command ['maxTimeMS' ])
297308 # getMore
309+ self .assertEqual ('getMore' , results ['started' ][1 ].command_name )
298310 self .assertFalse ('maxTimeMS' in results ['started' ][1 ].command )
299311
300312 finally :
0 commit comments