Commit f4d3ac63 authored by Łukasz Nowak's avatar Łukasz Nowak

test: Give more time for servers to start

Also improve message in case of failure.
parent c89c31a5
......@@ -157,8 +157,9 @@ class KedifaMixinCaucase(KedifaMixin):
self.caucase_runtime.start()
self.assertTrue(self.caucase_runtime.is_alive())
self.caucase_url = 'http://[%s]:%s' % (ip, port)
# give some time for caucase to be available
for i in range(20):
# give 5s for caucase to be available
b = time.time()
for i in range(50):
try:
requests.get(self.caucase_url)
except BaseException:
......@@ -167,7 +168,8 @@ class KedifaMixinCaucase(KedifaMixin):
else:
break
else:
raise
self.fail(
'Caucase not available after %.2fs seconds' % (time.time() - b))
def setUpKey(self, common_name):
# create key for the service and keep its downloaded ca_crt
......@@ -230,8 +232,9 @@ class KedifaMixinCaucase(KedifaMixin):
self.kedifa_runtime.start()
self.assertTrue(self.kedifa_runtime.is_alive())
# give some time for KeDiFa to be available
for i in range(5):
# give 5s for KeDiFa to be available
b = time.time()
for i in range(50):
try:
self.requests_get(self.kedifa_url + 'ping')
except BaseException:
......@@ -239,7 +242,8 @@ class KedifaMixinCaucase(KedifaMixin):
else:
break
else:
raise
self.fail(
'Kedifa not available after %.2fs seconds' % (time.time() - b))
def reserveReference(self, *args, **kwargs):
result = requests.post(
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment