From 9cb3fa7408b197032da07b88e025e0bad6096a0f Mon Sep 17 00:00:00 2001 From: Venkatesh Sampath Date: Tue, 15 Sep 2015 08:18:44 +0530 Subject: [PATCH] Fix server start ping timeout for functional tests When we run the functional tests using 'tox -epy27', the functional tests keeps failing due to ping timeout that happens after server starts (api, registry etc.,) in order to run the functional tests. Could make the tests pass only after increasing the ping timeout. This minor patch fixes ping timeout issue by increasing the timeout value from 10 to 30 seconds for ensuring consistent success of functional tests. Found any value lesser than 30 secs still continue to fail the tests. Closes-bug: #1497508 Change-Id: If1c5fc69ae34c976de2a0c5e9e70810b5b994491 --- glance/tests/functional/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/glance/tests/functional/__init__.py b/glance/tests/functional/__init__.py index a9dfd2b307..f17d89f169 100644 --- a/glance/tests/functional/__init__.py +++ b/glance/tests/functional/__init__.py @@ -813,7 +813,7 @@ class FunctionalTest(test_utils.BaseTestCase): except socket.error: return False - def wait_for_servers(self, servers, expect_launch=True, timeout=10): + def wait_for_servers(self, servers, expect_launch=True, timeout=30): """ Tight loop, waiting for the given server port(s) to be available. Returns when all are pingable. There is a timeout on waiting @@ -822,7 +822,7 @@ class FunctionalTest(test_utils.BaseTestCase): :param servers: Glance server ports to ping :param expect_launch: Optional, true iff the server(s) are expected to successfully start - :param timeout: Optional, defaults to 3 seconds + :param timeout: Optional, defaults to 30 seconds :return: None if launch expectation is met, otherwise an assertion message """