Skip to content

Commit bf89e69

Browse files
committed
Larger delta for X-RateLimit-Reset tests
These could be exceeded on a slow machine, with a higher delta this is much less likely. See issue2551202.
1 parent c9bcfe9 commit bf89e69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/rest_common.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ def testRestRateLimit(self):
11181118
# value will be almost 60. Allow 1-2 seconds for all 20 rounds.
11191119
self.assertAlmostEqual(
11201120
float(self.server.client.additional_headers["X-RateLimit-Reset"]),
1121-
59, delta=1)
1121+
59, delta=5)
11221122
self.assertEqual(
11231123
str(self.server.client.additional_headers["Retry-After"]),
11241124
"3") # check as string
@@ -1155,7 +1155,7 @@ def testRestRateLimit(self):
11551155
# we still need to wait a minute for everything to clear
11561156
self.assertAlmostEqual(
11571157
float(self.server.client.additional_headers["X-RateLimit-Reset"]),
1158-
59, delta=1)
1158+
59, delta=5)
11591159

11601160
# and make sure we need to wait another three seconds
11611161
# as we consumed the last api call

0 commit comments

Comments
 (0)