BFD_CHECK_TX([p0], [500ms], [300ms], [500ms])
BFD_CHECK_RX([p0], [3000ms], [3000ms], [500ms])
-# advance clock by 5000ms and check the the flags are all 'none'.
+# advance clock by 5000ms and check the flags are all 'none'.
ovs-appctl time/warp 5000 500
BFD_CHECK([p0], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
BFD_CHECK([p1], [true], [false], [none], [up], [No Diagnostic], [none], [up], [No Diagnostic])
BFD_CHECK([p0], [false], [false], [none], [down], [No Diagnostic], [none], [down], [No Diagnostic])
AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
+OVS_VSWITCHD_STOP
AT_CLEANUP
BFD_CHECK_RX([p0], [500ms], [500ms], [300ms])
AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
+OVS_VSWITCHD_STOP
AT_CLEANUP
# forwarding_if_rx Test3
BFD_CHECK_RX([p0], [1000ms], [1000ms], [300ms])
AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
+OVS_VSWITCHD_STOP
AT_CLEANUP
# forwarding_if_rx Test4
BFD_CHECK([p0], [false], [false], [none], [down], [Control Detection Time Expired], [none], [down], [No Diagnostic])
AT_CHECK([ovs-vsctl del-br br1], [0], [ignore])
+OVS_VSWITCHD_STOP
AT_CLEANUP
# test bfd:flap_count.
set Interface p1 bfd:enable=true bfd:min_tx=100 bfd:min_rx=100])
ovs-appctl time/stop
+# Disable the stats update to prevent the race between ovsdb updating
+# stats and ovs-vsctl cmd closing the jsonrpc session.
+AT_CHECK([ovs-vsctl set Open_vSwitch . other_config:stats-update-interval=50000000])
# Part-1 wait for a while to stablize bfd.
ovs-appctl time/warp 10100 100