Increase gerrit_util retry count and delay.
Bug: 881860
Change-Id: I6402ff2665b70b46558799dbb16ac9c7a9d7d640
Reviewed-on: https://chromium-review.googlesource.com/1224990
Reviewed-by: Andrii Shyshkalov <tandrii@chromium.org>
Commit-Queue: Steve Kobes <skobes@chromium.org>
diff --git a/gerrit_util.py b/gerrit_util.py
index 610d9b3..f15f683 100644
--- a/gerrit_util.py
+++ b/gerrit_util.py
@@ -32,9 +32,10 @@
from third_party import httplib2
LOGGER = logging.getLogger()
-# With a starting sleep time of 1 second, 2^n exponential backoff, and six
-# total tries, the sleep time between the first and last tries will be 31s.
-TRY_LIMIT = 6
+# With a starting sleep time of 1.5 seconds, 2^n exponential backoff, and seven
+# total tries, the sleep time between the first and last tries will be 94.5 sec.
+# TODO(crbug.com/881860): Lower this when crbug.com/877717 is fixed.
+TRY_LIMIT = 7
# Controls the transport protocol used to communicate with gerrit.
@@ -379,7 +380,7 @@
Common additions include 204, 400, and 404.
Returns: A string buffer containing the connection's reply.
"""
- sleep_time = 1
+ sleep_time = 1.5
for idx in range(TRY_LIMIT):
response, contents = conn.request(**conn.req_params)