diff mbox series

[ovs-dev,2/4] ovn.at: Fix test "nb_cfg timestamp -- ovn-northd-ddlog".

Message ID 20210611062452.362848-2-hzhou@ovn.org
State Accepted
Headers show
Series [ovs-dev,1/4] ovn-northd.at: Fix test "northd ssl file change -- ovn-northd-ddlog". | expand

Commit Message

Han Zhou June 11, 2021, 6:24 a.m. UTC
The test case fails quite often because of timing. When nb_cfg_timestamp
is updated in SB DB it may not be updated immediately in NB's
hv_cfg_timestamp. This patch use "wait_column" to wait.

Signed-off-by: Han Zhou <hzhou@ovn.org>
---
 tests/ovn.at | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Mark Michelson June 11, 2021, 6:24 p.m. UTC | #1
Acked-by: Mark Michelson <mmichels@redhat.com>

On 6/11/21 2:24 AM, Han Zhou wrote:
> The test case fails quite often because of timing. When nb_cfg_timestamp
> is updated in SB DB it may not be updated immediately in NB's
> hv_cfg_timestamp. This patch use "wait_column" to wait.
> 
> Signed-off-by: Han Zhou <hzhou@ovn.org>
> ---
>   tests/ovn.at | 3 +--
>   1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 11a85c457..847c31de6 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -23952,8 +23952,7 @@ wait_row_count Chassis_Private 1 name=hv3 nb_cfg=2
>   get_cfg 4
>   hv3_ts=$(ovn-sbctl --bare --columns=nb_cfg_timestamp find chassis_private name=hv3)
>   echo hv3_ts=$hv3_ts
> -hv_cfg_ts=$(ovn-nbctl get nb_global . hv_cfg_timestamp)
> -check test "$hv3_ts" = "$hvt4"
> +wait_column $hv3_ts nb:nb_global hv_cfg_timestamp
>   
>   AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=sb sync | grep ms | wc -l) = x2])
>   AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=hv sync | grep ms | wc -l) = x3])
>
diff mbox series

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 11a85c457..847c31de6 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -23952,8 +23952,7 @@  wait_row_count Chassis_Private 1 name=hv3 nb_cfg=2
 get_cfg 4
 hv3_ts=$(ovn-sbctl --bare --columns=nb_cfg_timestamp find chassis_private name=hv3)
 echo hv3_ts=$hv3_ts
-hv_cfg_ts=$(ovn-nbctl get nb_global . hv_cfg_timestamp)
-check test "$hv3_ts" = "$hvt4"
+wait_column $hv3_ts nb:nb_global hv_cfg_timestamp
 
 AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=sb sync | grep ms | wc -l) = x2])
 AT_CHECK([test x$(ovn-nbctl --print-wait-time --wait=hv sync | grep ms | wc -l) = x3])