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
This commit is contained in:
Luis Tomas Bolivar 2018-06-11 12:16:27 +02:00
parent 7d5e376cc6
commit 3ab0d37657
1 changed files with 3 additions and 3 deletions

View File

@ -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')