From b6354e7b892c4fc9f9f940856fa4d19fa192533a Mon Sep 17 00:00:00 2001 From: Munyoki Kilyungi Date: Mon, 6 Nov 2023 14:51:04 +0300 Subject: Get full trace of SSL error and reduce number of retries in MR. * test/requests/test-website.py (host_is_online): Reduce tries from 10 to 5. Also, print out the full error---useful for CD debugging. Signed-off-by: Munyoki Kilyungi --- test/requests/test-website.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'test/requests') diff --git a/test/requests/test-website.py b/test/requests/test-website.py index fe197018..91bcb12d 100755 --- a/test/requests/test-website.py +++ b/test/requests/test-website.py @@ -22,13 +22,14 @@ print("Mechanical Rob firing up...") def host_is_online(host): import time import requests - for count in range(1, 10): + for count in range(1, 5): try: time.sleep(count) requests.get(host, verify=False) return True except Exception as cre: print(f"Retrying in {count + 1} seconds ...") + print(f"Error: {cre}") return False -- cgit v1.2.3