Hi,

This fix the testsuite which breaks 50% of times inside a VM.
It would be great to have it included in master, 2.14 and older
branches.

fbl

On Wed, Jun 10, 2020 at 08:45:38PM -0300, Flavio Leitner wrote:
> The test 'Check Python IDL reconnects to leader - Python3
> (leader only)' fails sometimes when the first ovsdb-server
> gets killed before the others had joined the cluster.
> 
> Fix the function ovsdb_cluster_start_idltest to wait them
> to join the cluster.
> 
> Suggested-by: Ilya Maximets <i.maxim...@ovn.org>
> Signed-off-by: Flavio Leitner <f...@sysclose.org>
> ---
>  tests/ovsdb-idl.at | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/tests/ovsdb-idl.at b/tests/ovsdb-idl.at
> index b5cbee7d9..c045e9264 100644
> --- a/tests/ovsdb-idl.at
> +++ b/tests/ovsdb-idl.at
> @@ -29,6 +29,17 @@ ovsdb_cluster_start_idltest () {
>       ovsdb-server -vraft -vconsole:warn --detach --no-chdir 
> --log-file=s$i.log --pidfile=s$i.pid --unixctl=s$i --remote=punix:s$i.ovsdb 
> ${2:+--remote=$2} s$i.db || return $?
>     done
>     on_exit 'kill `cat s*.pid`'
> +   for i in `seq $n`; do
> +     for d in `seq 1 "$OVS_CTL_TIMEOUT"`; do
> +       if ovs-appctl -t $(pwd)/s$i cluster/status ${schema_name} | grep -q 
> 'Status: cluster member'; then
> +         break
> +       fi
> +       sleep 1
> +     done
> +     if ! ovs-appctl -t $(pwd)/s$i cluster/status ${schema_name} | grep -q 
> 'Status: cluster member'; then
> +       return 1
> +     fi
> +   done
>  }
>  
>  # ovsdb_cluster_leader [REMOTES] [DATABASE]
> -- 
> 2.26.2
> 
> _______________________________________________
> dev mailing list
> d...@openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-dev

-- 
fbl
_______________________________________________
dev mailing list
d...@openvswitch.org
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to