mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-06-23 15:30:45 -04:00
See if adding a sleep + retry makes test less flaky on CI
This commit is contained in:
parent
1056534a71
commit
c8b70c30b9
@ -5,7 +5,7 @@
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
import zlib, json, os
|
import zlib, json, os, time
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
@ -36,7 +36,11 @@ class ContentTest(LibraryBaseTest):
|
|||||||
conn = server.connect()
|
conn = server.connect()
|
||||||
request = partial(make_request, conn, prefix='/ajax/book')
|
request = partial(make_request, conn, prefix='/ajax/book')
|
||||||
|
|
||||||
r, data = request('/x')
|
try:
|
||||||
|
r, data = request('/x')
|
||||||
|
except ConnectionRefusedError:
|
||||||
|
time.sleep(2)
|
||||||
|
r, data = request('/x')
|
||||||
self.ae(r.status, NOT_FOUND)
|
self.ae(r.status, NOT_FOUND)
|
||||||
|
|
||||||
r, onedata = request('/1')
|
r, onedata = request('/1')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user