In the test case for debug/delay-nb-cfg-report, it sets the delay as 2 seconds, and firstly triggered a sync with wait timeout being 1 sec and expects the wait timedout, and then it immediately started another sync with wait timeout being 3 sec, expecting it not timing out.
However, since 2 + 2 = 1 + 3, there is a good chance that the second wait would still time out, so the test fails occasionally. This patch fixes it by sleep another 1 sec to let the 1st delay complete before starting the second sync and wait. Reported-by: Ilya Maximets <[email protected]> Fixes: a8182e21484 ("ovn-controller: Unix command debug/delay-nb-cfg-report.") Signed-off-by: Han Zhou <[email protected]> --- tests/ovn-controller.at | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/ovn-controller.at b/tests/ovn-controller.at index 7ed5216..d806134 100644 --- a/tests/ovn-controller.at +++ b/tests/ovn-controller.at @@ -402,6 +402,9 @@ AT_CHECK([ovn-appctl -t ovn-controller debug/delay-nb-cfg-report 2], [0], AT_FAIL_IF([ovn-nbctl --timeout=1 --wait=hv sync]) +# sleep another 1 sec so that the original 2 sec sleep is done in ovn-controller +sleep 1 + AT_CHECK([ovn-nbctl --timeout=3 --wait=hv sync]) AT_CHECK([ovn-appctl -t ovn-controller debug/delay-nb-cfg-report 0], [0], -- 2.1.0 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
