Commit c2fdf7d2 authored by Vincent Pelletier's avatar Vincent Pelletier Committed by Vincent Pelletier

test: Fail fast if caucased dies during startup.

parent 964fbbb3
...@@ -313,7 +313,10 @@ class CaucaseTest(unittest.TestCase): ...@@ -313,7 +313,10 @@ class CaucaseTest(unittest.TestCase):
server.start() server.start()
parsed_url = urlparse.urlparse(self._caucase_url) parsed_url = urlparse.urlparse(self._caucase_url)
if not retry( if not retry(
lambda: canConnect((parsed_url.hostname, parsed_url.port)), lambda: (
self.assertTrue(server.is_alive(), 'caucased crashed on startup') or
canConnect((parsed_url.hostname, parsed_url.port))
),
): ):
self._stopServer() self._stopServer()
raise AssertionError('Could not connect to %r after 1 second' % ( raise AssertionError('Could not connect to %r after 1 second' % (
......
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