Skip to content

Commit a4dd0c6

Browse files
committed
Improve consistency of test
1 parent d554e5b commit a4dd0c6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/asynchronous/test_concurrency.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525

2626
class TestAsyncConcurrency(AsyncIntegrationTest):
2727
async def _task(self, client):
28-
await client.db.test.find_one({"$where": delay(0.05)})
28+
await client.db.test.find_one({"$where": delay(0.10)})
2929

3030
async def test_concurrency(self):
3131
tasks = []
@@ -50,5 +50,5 @@ async def test_concurrency(self):
5050
concurrent_time = time.time() - start
5151

5252
percent_faster = (sequential_time - concurrent_time) / concurrent_time * 100
53-
# We expect the concurrent tasks to be at least twice as fast
54-
self.assertGreaterEqual(percent_faster, 100)
53+
# We expect the concurrent tasks to be at least 75% faster on all platforms as a conservative benchmark
54+
self.assertGreaterEqual(percent_faster, 75)

0 commit comments

Comments
 (0)