From 3ab0d3765761571c5a7dedf22e23b20d71423955 Mon Sep 17 00:00:00 2001 From: Luis Tomas Bolivar Date: Mon, 11 Jun 2018 12:16:27 +0200 Subject: [PATCH] Increase ping counter to avoid tests flakiness There may be cases where sending just one packet is not enough or may randomly fail. One example for this is with OVN backend where the first packet will be drop by design if it needs to go through a logical router. For this reason this patch increases the ping count to 4 to be on the safe side. Change-Id: Ic2bdc3f75c684cc4a9c99b10268cf9390e3e4586 --- kuryr_tempest_plugin/tests/scenario/test_cross_ping.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py b/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py index 42bac2c4..829d22e2 100644 --- a/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py +++ b/kuryr_tempest_plugin/tests/scenario/test_cross_ping.py @@ -52,7 +52,7 @@ class TestCrossPingScenario(base.BaseKuryrScenarioTest): # check connectivity from VM to Pod ssh_client = self.get_remote_client(fip['floating_ip_address'], private_key=keypair['private_key']) - cmd = ("ping -c1 -w1 %s &> /dev/null; echo $?" % + cmd = ("ping -c4 -w4 %s &> /dev/null; echo $?" % pod_fip['floatingip']['floating_ip_address']) try: @@ -69,7 +69,7 @@ class TestCrossPingScenario(base.BaseKuryrScenarioTest): # check connectivity from Pod to VM cmd = [ - "/bin/sh", "-c", "ping -c 1 {dst_ip}>/dev/null ; echo $?".format( + "/bin/sh", "-c", "ping -c 4 {dst_ip}>/dev/null ; echo $?".format( dst_ip=fip['floating_ip_address'])] self.assertEqual(self.exec_command_in_pod(pod_name, cmd), '0') @@ -83,7 +83,7 @@ class TestCrossPingScenario(base.BaseKuryrScenarioTest): pod_fip_list.append(self.assign_fip_to_pod(pod_name)) cmd = [ - "/bin/sh", "-c", "ping -c 1 {dst_ip}>/dev/null ; echo $?".format( + "/bin/sh", "-c", "ping -c 4 {dst_ip}>/dev/null ; echo $?".format( dst_ip=pod_fip_list[1]['floatingip']['floating_ip_address'])] time.sleep(20) self.assertEqual(self.exec_command_in_pod(pod_name_list[0], cmd), '0')