changeset 6660:32c6e98e5a21

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.
author Ralf Schlatterbeck <rsc@runtux.com>
date Tue, 03 May 2022 16:21:25 +0200
parents c9b56477fb41
children 18445cd132c8
files test/rest_common.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/rest_common.py	Tue May 03 15:50:56 2022 +0200
+++ b/test/rest_common.py	Tue May 03 16:21:25 2022 +0200
@@ -1118,7 +1118,7 @@
         # value will be almost 60. Allow 1-2 seconds for all 20 rounds.
         self.assertAlmostEqual(
             float(self.server.client.additional_headers["X-RateLimit-Reset"]),
-            59, delta=1)
+            59, delta=5)
         self.assertEqual(
             str(self.server.client.additional_headers["Retry-After"]),
             "3")  # check as string
@@ -1155,7 +1155,7 @@
         # we still need to wait a minute for everything to clear
         self.assertAlmostEqual(
             float(self.server.client.additional_headers["X-RateLimit-Reset"]),
-            59, delta=1)
+            59, delta=5)
 
         # and make sure we need to wait another three seconds
         # as we consumed the last api call

Roundup Issue Tracker: http://roundup-tracker.org/