File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 25
25
26
26
class TestAsyncConcurrency (AsyncIntegrationTest ):
27
27
async def _task (self , client ):
28
- await client .db .test .find_one ({"$where" : delay (1 )})
28
+ await client .db .test .find_one ({"$where" : delay (0.05 )})
29
29
30
- # Remove once PYTHON-4636 is merged
31
- @async_client_context .require_no_tls
32
30
async def test_concurrency (self ):
33
31
tasks = []
34
32
iterations = 5
@@ -52,5 +50,5 @@ async def test_concurrency(self):
52
50
concurrent_time = time .time () - start
53
51
54
52
percent_faster = (sequential_time - concurrent_time ) / concurrent_time * 100
55
- # We expect the concurrent tasks to be at least 50% faster
56
- self .assertGreaterEqual (percent_faster , 50 )
53
+ # We expect the concurrent tasks to be at least twice as fast
54
+ self .assertGreaterEqual (percent_faster , 100 )
You can’t perform that action at this time.
0 commit comments