File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ async def test_selector_called(self):
130130 test_collection = mongo_client .testdb .test_collection
131131 self .addAsyncCleanup (mongo_client .drop_database , "testdb" )
132132
133- # Do N operations and test selector is called at least N times.
133+ # Do N operations and test selector is called at least N-1 times due to fast path .
134134 await test_collection .insert_one ({"age" : 20 , "name" : "John" })
135135 await test_collection .insert_one ({"age" : 31 , "name" : "Jane" })
136136 await test_collection .update_one ({"name" : "Jane" }, {"$set" : {"age" : 21 }})
137137 await test_collection .find_one ({"name" : "Roe" })
138- self .assertGreaterEqual (selector .call_count , 4 )
138+ self .assertGreaterEqual (selector .call_count , 3 )
139139
140140 @async_client_context .require_replica_set
141141 async def test_latency_threshold_application (self ):
Original file line number Diff line number Diff line change @@ -130,12 +130,12 @@ def test_selector_called(self):
130130 test_collection = mongo_client .testdb .test_collection
131131 self .addCleanup (mongo_client .drop_database , "testdb" )
132132
133- # Do N operations and test selector is called at least N times.
133+ # Do N operations and test selector is called at least N-1 times due to fast path .
134134 test_collection .insert_one ({"age" : 20 , "name" : "John" })
135135 test_collection .insert_one ({"age" : 31 , "name" : "Jane" })
136136 test_collection .update_one ({"name" : "Jane" }, {"$set" : {"age" : 21 }})
137137 test_collection .find_one ({"name" : "Roe" })
138- self .assertGreaterEqual (selector .call_count , 4 )
138+ self .assertGreaterEqual (selector .call_count , 3 )
139139
140140 @client_context .require_replica_set
141141 def test_latency_threshold_application (self ):
You can’t perform that action at this time.
0 commit comments