From 2d8a8ec41de796237154f9c6f2d45fbe965a3303 Mon Sep 17 00:00:00 2001 From: Eduardo Olivares Date: Thu, 15 Oct 2020 21:07:05 +0200 Subject: [PATCH] Reduce test_ping_subnet_gateways duration when it fails Due to the different retries mechanisms, these test was taking hours when VM instances were not reachable due to any problem, causing tobiko execution timeout Change-Id: Ibc3767d9563982f462f1ec9900029d49c3eee0d3 --- tobiko/shell/ping/_interface.py | 4 ++-- tobiko/shell/ssh/config.py | 2 +- tobiko/tests/scenario/neutron/test_port.py | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/tobiko/shell/ping/_interface.py b/tobiko/shell/ping/_interface.py index 029c32769..a3a4f138e 100644 --- a/tobiko/shell/ping/_interface.py +++ b/tobiko/shell/ping/_interface.py @@ -89,8 +89,8 @@ def get_ping_usage(ssh_client): if usage: LOG.debug('Got ping usage text') else: - LOG.warning("Unable to get usage message from ping command:\n" - "%s", result.details) + raise ValueError("Unable to get usage message from ping command:\n" + "%s" % result.details) return usage diff --git a/tobiko/shell/ssh/config.py b/tobiko/shell/ssh/config.py index 2a43239c0..d21ceb419 100644 --- a/tobiko/shell/ssh/config.py +++ b/tobiko/shell/ssh/config.py @@ -61,7 +61,7 @@ OPTIONS = [ help=("Minimal seconds to wait between every " "failed SSH connection attempt")), cfg.IntOpt('connection_timeout', - default=600., + default=200., help=("Time before stopping retrying establishing an SSH " "connection")), cfg.StrOpt('proxy_jump', diff --git a/tobiko/tests/scenario/neutron/test_port.py b/tobiko/tests/scenario/neutron/test_port.py index a308a38bf..b931be9de 100644 --- a/tobiko/tests/scenario/neutron/test_port.py +++ b/tobiko/tests/scenario/neutron/test_port.py @@ -46,7 +46,6 @@ class PortTest(testtools.TestCase): network_subnets = self.stack.network_stack.network_details['subnets'] self.assertEqual(set(network_subnets), set(port_subnets)) - @tobiko.retry_test_case(interval=30.) def test_ping_subnet_gateways(self): network_id = self.stack.network_stack.network_id subnets = neutron.list_subnets(network_id=network_id)