File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -691,14 +691,19 @@ def test_kill_cursors(self):
691691 list (cursor )
692692
693693 def test_lazy_connect_w0 (self ):
694+ # Ensure that connect-on-demand works when the first operation is
695+ # an unacknowledged write. This exercises _writable_max_wire_version().
696+
697+ # Use a separate collection to avoid races where we're still
698+ # completing an operation on a collection while the next test begins.
694699 client = rs_or_single_client (connect = False )
695- client .pymongo_test .test .insert ({}, w = 0 )
700+ client .test_lazy_connect_w0 .test .insert ({}, w = 0 )
696701
697702 client = rs_or_single_client (connect = False )
698- client .pymongo_test .test .update ({}, {'$set' : {'x' : 1 }}, w = 0 )
703+ client .test_lazy_connect_w0 .test .update ({}, {'$set' : {'x' : 1 }}, w = 0 )
699704
700705 client = rs_or_single_client (connect = False )
701- client .pymongo_test .test .remove (w = 0 )
706+ client .test_lazy_connect_w0 .test .remove (w = 0 )
702707
703708 @client_context .require_no_mongos
704709 def test_exhaust_network_error (self ):
You can’t perform that action at this time.
0 commit comments