From: Jesse Gross Date: Tue, 7 Aug 2012 22:26:33 +0000 (-0700) Subject: tests: Add delay in NetFlow unit tests before killing processes. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d441e1b3e9286126818b46ddf2ee06a313e7c2d0;p=openvswitch tests: Add delay in NetFlow unit tests before killing processes. At the end of the NetFlow unit tests we warp time to force any remaining flows to expire and then immediately kill OVS and the collector. However, this creates a race where sometimes these processes are killed before the last records are sent or collected. It's possible to force OVS to go through the run loop one last time before exiting but it's harder to enforce that the collector receives the packet. This simply avoids the problem by adding a 1 second delay before killing the processes, which should be more than enough time. Signed-off-by: Jesse Gross --- diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index 300d091a..88183164 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -958,6 +958,7 @@ for delay in 1000 30000; do ovs-appctl time/warp $delay done +sleep 1 OVS_VSWITCHD_STOP ovs-appctl -t test-netflow exit @@ -1006,6 +1007,7 @@ done ovs-appctl time/warp 10000 +sleep 1 OVS_VSWITCHD_STOP ovs-appctl -t test-netflow exit