From a54604d2e34fc948070eb874e73a3f3c1eb0d12e Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 16 Jul 2020 11:51:22 +0530 Subject: [PATCH] Retry the http_basic test once if it fails --- src/calibre/srv/tests/http.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/calibre/srv/tests/http.py b/src/calibre/srv/tests/http.py index 81f91b483e..58ebcd4946 100644 --- a/src/calibre/srv/tests/http.py +++ b/src/calibre/srv/tests/http.py @@ -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'