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):
130
130
test_collection = mongo_client .testdb .test_collection
131
131
self .addAsyncCleanup (mongo_client .drop_database , "testdb" )
132
132
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 .
134
134
await test_collection .insert_one ({"age" : 20 , "name" : "John" })
135
135
await test_collection .insert_one ({"age" : 31 , "name" : "Jane" })
136
136
await test_collection .update_one ({"name" : "Jane" }, {"$set" : {"age" : 21 }})
137
137
await test_collection .find_one ({"name" : "Roe" })
138
- self .assertGreaterEqual (selector .call_count , 4 )
138
+ self .assertGreaterEqual (selector .call_count , 3 )
139
139
140
140
@async_client_context .require_replica_set
141
141
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):
130
130
test_collection = mongo_client .testdb .test_collection
131
131
self .addCleanup (mongo_client .drop_database , "testdb" )
132
132
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 .
134
134
test_collection .insert_one ({"age" : 20 , "name" : "John" })
135
135
test_collection .insert_one ({"age" : 31 , "name" : "Jane" })
136
136
test_collection .update_one ({"name" : "Jane" }, {"$set" : {"age" : 21 }})
137
137
test_collection .find_one ({"name" : "Roe" })
138
- self .assertGreaterEqual (selector .call_count , 4 )
138
+ self .assertGreaterEqual (selector .call_count , 3 )
139
139
140
140
@client_context .require_replica_set
141
141
def test_latency_threshold_application (self ):
You can’t perform that action at this time.
0 commit comments