Skip to content

Commit cbe760f

Browse files
committed
Test ConstantReconnectionPolicy: Fix the copy-paste bug
This test compared the variable with itself. This is obviously an error. I think it meant to compare it with the configured delay.
1 parent 238e33c commit cbe760f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/unit/test_policies.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -908,13 +908,13 @@ def test_schedule(self):
908908
Test ConstantReconnectionPolicy schedule
909909
"""
910910

911-
delay = 2
911+
configured_delay = 2
912912
max_attempts = 100
913-
policy = ConstantReconnectionPolicy(delay=delay, max_attempts=max_attempts)
913+
policy = ConstantReconnectionPolicy(delay=configured_delay, max_attempts=max_attempts)
914914
schedule = list(policy.new_schedule())
915915
assert len(schedule) == max_attempts
916916
for i, delay in enumerate(schedule):
917-
assert delay == delay
917+
assert delay == configured_delay
918918

919919
def test_schedule_negative_max_attempts(self):
920920
"""

0 commit comments

Comments
 (0)