Skip to content

Commit 0d34d2d

Browse files
committed
round seconds
1 parent ab5215e commit 0d34d2d

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

test/asynchronous/test_transactions.py

Lines changed: 2 additions & 4 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) # backoff alone is ~3.5 seconds
642+
self.assertLess(end - start, 5) # sum of backoffs is ~3.5 seconds
643643

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

681681
end = time.monotonic()
682-
self.assertGreaterEqual(
683-
end - start, 3.5629515313825695
684-
) # sum of backoffs is 3.5629515313825695
682+
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
685683

686684
random.random = _original_random_random
687685

test/test_transactions.py

Lines changed: 2 additions & 4 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) # backoff alone is ~3.5 seconds
628+
self.assertLess(end - start, 5) # sum of backoffs is ~3.5 seconds
629629

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

665665
end = time.monotonic()
666-
self.assertGreaterEqual(
667-
end - start, 3.5629515313825695
668-
) # sum of backoffs is 3.5629515313825695
666+
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
669667

670668
random.random = _original_random_random
671669

0 commit comments

Comments
 (0)