Retry the http_basic test once if it fails

This commit is contained in:
Kovid Goyal 2020-07-16 11:51:22 +05:30
parent abba1ef004
commit a54604d2e3
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -128,6 +128,14 @@ class TestHTTP(BaseTest):
def test_http_basic(self): # {{{
'Test basic HTTP protocol conformance'
try:
self.do_http_basic()
except Exception:
# this test is a little flaky on the windows CI machine.
time.sleep(1)
self.do_http_basic()
def do_http_basic(self):
from calibre.srv.errors import HTTPNotFound, HTTPRedirect
body = 'Requested resource not found'