Skip to content

Commit 678c66f

Browse files
committed
fix test and make comment more specific
1 parent 8ce9d7f commit 678c66f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

test/asynchronous/test_transactions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,7 +651,7 @@ async def callback(session):
651651
await s.with_transaction(callback)
652652

653653
end = time.monotonic()
654-
self.assertLess(end - start, 5) # sum of backoffs is ~3.5 seconds
654+
self.assertLess(end - start, 3.5) # sum of 30 backoffs are 3.5629515313825695
655655

656656
@async_client_context.require_test_commands
657657
@async_client_context.require_transactions
@@ -691,7 +691,7 @@ async def callback(session):
691691
await s.with_transaction(callback)
692692

693693
end = time.monotonic()
694-
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
694+
self.assertGreaterEqual(end - start, 3.5) # sum of 30 backoffs are 3.5629515313825695
695695

696696
random.random = _original_random_random
697697

test/test_transactions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ def callback(session):
637637
s.with_transaction(callback)
638638

639639
end = time.monotonic()
640-
self.assertLess(end - start, 5) # sum of backoffs is ~3.5 seconds
640+
self.assertLess(end - start, 3.5) # sum of 30 backoffs are 3.5629515313825695
641641

642642
@client_context.require_test_commands
643643
@client_context.require_transactions
@@ -675,7 +675,7 @@ def callback(session):
675675
s.with_transaction(callback)
676676

677677
end = time.monotonic()
678-
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
678+
self.assertGreaterEqual(end - start, 3.5) # sum of 30 backoffs are 3.5629515313825695
679679

680680
random.random = _original_random_random
681681

0 commit comments

Comments
 (0)