Skip to content

Commit 5b9dbe3

Browse files
committed
fix test and make comment more specific
1 parent b113c44 commit 5b9dbe3

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
@@ -639,7 +639,7 @@ async def callback(session):
639639
await s.with_transaction(callback)
640640

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

644644
@async_client_context.require_test_commands
645645
@async_client_context.require_transactions
@@ -679,7 +679,7 @@ async def callback(session):
679679
await s.with_transaction(callback)
680680

681681
end = time.monotonic()
682-
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
682+
self.assertGreaterEqual(end - start, 3.5) # sum of 30 backoffs are 3.5629515313825695
683683

684684
random.random = _original_random_random
685685

test/test_transactions.py

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

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

630630
@client_context.require_test_commands
631631
@client_context.require_transactions
@@ -663,7 +663,7 @@ def callback(session):
663663
s.with_transaction(callback)
664664

665665
end = time.monotonic()
666-
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
666+
self.assertGreaterEqual(end - start, 3.5) # sum of 30 backoffs are 3.5629515313825695
667667

668668
random.random = _original_random_random
669669

0 commit comments

Comments
 (0)