summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorLance Richardson <lrichard@redhat.com>2016-06-06 14:03:00 -0400
committerRussell Bryant <russell@ovn.org>2016-06-21 14:04:06 -0400
commita1361a6ed65fc39c52cfd4418f154d1c9abcb3f8 (patch)
tree862faf86b946490d7b108f54bac3f145351b3222 /tests
parentabdf31d16d9ca28632f9a02d8791cb2671ae9058 (diff)
downloadopenvswitch-a1361a6ed65fc39c52cfd4418f154d1c9abcb3f8.tar.gz
tests: make ovn logical router test case more reliable
The "ovn -- 1 HVs, 2 LSs, 1 lport/LS, 1 LR" test case creates a configuration including a logical router, then: 1) Sends a packet that is expected to be forwarded by the logical router. 2) Disables the logical router. 3) Sends another packet, identical to the one sent in (1), that should not be forwarded. This test case fails intermittently, apparently because the disabling of the logical router in (2) has not yet been propagated to the forwarding plane at the time the second packet is sent. (When the failure occurs, two packets are captured whereas only one is expected.) Address this issue by adding a one second sleep between steps (2) and (3). Adding a sleep does not actually fix anything, but it does make this test case more likely to work correctly. In one series of tests, this test case failed 11 times out of 20 without this fix and succeeded 20 times out of 20 attempts with this fix. Fixes: 5412db307420 ("ovn: Add column enabled to table Logical_Router") Signed-off-by: Lance Richardson <lrichard@redhat.com> Signed-off-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovn.at4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/ovn.at b/tests/ovn.at
index a24e774ac..ad209741c 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -2320,6 +2320,10 @@ echo "---------------------"
echo "------ hv1 dump ----------"
as hv1 ovs-ofctl dump-flows br-int
+# Allow some time for the disabling of logical router R1 to propagate.
+# XXX This should be more systematic.
+sleep 1
+
as hv1 ovs-appctl netdev-dummy/receive vif1 $packet
# Packet to Expect