Fix expect_timeout_error in IPv6 scenario tests

Fix except_timeout_error call to make_request. In case of an IPv6
address and a TCP-based protocol, make_request expects brackets around
the address (ex: [2001:12::2]).

Some tests failed with the following error: "Validate URL got exception:
Failed to parse: http://fd22:262a:41e1:1::f5:97. Retrying.". Then the
requests timed out because each retry failed and not for the excepted
reason (which is: SG update was applied)
Because of that issue, some IPv6 tests based on
_test_listener_with_allowed_cidrs may have failed because the tests
considered that the SG were applied, while the traffic could still pass.

Change-Id: I2e6d108a8d4ce197ae657ea10b10f63b1a5850c4
This commit is contained in:
Gregory Thiemonge 2021-06-22 09:14:51 +02:00
parent cac3eefc44
commit 88d78fba15
1 changed files with 2 additions and 0 deletions

View File

@ -493,6 +493,8 @@ class IPv6TrafficOperationsScenarioTest(
# wait until Neutron completes the SG update.
# See https://bugs.launchpad.net/neutron/+bug/1866353.
def expect_timeout_error(address, protocol, protocol_port):
if protocol != const.UDP:
address = "[{}]".format(address)
try:
self.make_request(address, protocol=protocol,
protocol_port=protocol_port)