Skip to content

Commit 3442866

Browse files
committed
round seconds
1 parent 96c4d3f commit 3442866

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
@@ -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) # backoff alone is ~3.5 seconds
654+
self.assertLess(end - start, 5) # sum of backoffs is ~3.5 seconds
655655

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

693693
end = time.monotonic()
694-
self.assertGreaterEqual(
695-
end - start, 3.5629515313825695
696-
) # sum of backoffs is 3.5629515313825695
694+
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
697695

698696
random.random = _original_random_random
699697

test/test_transactions.py

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

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

677677
end = time.monotonic()
678-
self.assertGreaterEqual(
679-
end - start, 3.5629515313825695
680-
) # sum of backoffs is 3.5629515313825695
678+
self.assertGreaterEqual(end - start, 3.5) # sum of backoffs is 3.5629515313825695
681679

682680
random.random = _original_random_random
683681

0 commit comments

Comments
 (0)