summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordu.net>2017-02-07 13:41:05 +0100
committerLinus Nordberg <linus@nordu.net>2017-02-07 13:41:05 +0100
commit81292083fab81009ac9b1401947feefd094b9384 (patch)
tree6e6a13ba24c07aa397aa0ea2b60dc7f3fdc16c1e /tools
parentb287029eb1a60bb8f6a5658bf337becf72cbbff8 (diff)
parent06f381fe919e3cc49e082b2ffeb5841e3f618d75 (diff)
Merge branch 'erlmerge_backup_keymgmt' of https://git.nordu.net/user/map/catlfish into map-erlmerge_backup_keymgmt
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testcase1.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/testcase1.py b/tools/testcase1.py
index 12079c8..6a12301 100755
--- a/tools/testcase1.py
+++ b/tools/testcase1.py
@@ -148,9 +148,18 @@ def get_and_check_entry(timestamp, chain, leaf_index, baseurl):
len(submittedcertchain),
len(submittedcertchain))
+def get_sth_retry(baseurl, tries=1):
+ for i in range(tries):
+ try:
+ return get_sth(baseurl)
+ except requests.exceptions.HTTPError, e:
+ if e.response.status_code == 500:
+ sleep(1)
+ raise e
+
def correct_tree_size(expected):
for baseurl in baseurls:
- sth = get_sth(baseurl)
+ sth = get_sth_retry(baseurl, tries=10)
tree_size = sth["tree_size"]
if tree_size != expected:
return False