diff mbox

[ovs-dev,2/5] ovn: Make two end-to-end tests more reliable.

Message ID 1469603005-5992-3-git-send-email-blp@ovn.org
State Accepted
Headers show

Commit Message

Ben Pfaff July 27, 2016, 7:03 a.m. UTC
These tests change the northbound configuration and then immediately check
that the changes have taken effect on the hypervisors.  This can't work
reliably, so add a sleep to each one.

Signed-off-by: Ben Pfaff <blp@ovn.org>
---
 tests/ovn.at | 9 +++++++++
 1 file changed, 9 insertions(+)

Comments

Ryan Moats July 29, 2016, 3:02 a.m. UTC | #1
"dev" <dev-bounces@openvswitch.org> wrote on 07/27/2016 02:03:22 AM:

> From: Ben Pfaff <blp@ovn.org>
> To: dev@openvswitch.org
> Cc: Ben Pfaff <blp@ovn.org>
> Date: 07/27/2016 02:03 AM
> Subject: [ovs-dev] [PATCH 2/5] ovn: Make two end-to-end tests more
reliable.
> Sent by: "dev" <dev-bounces@openvswitch.org>
>
> These tests change the northbound configuration and then immediately
check
> that the changes have taken effect on the hypervisors.  This can't work
> reliably, so add a sleep to each one.
>
> Signed-off-by: Ben Pfaff <blp@ovn.org>
> ---
>  tests/ovn.at | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
> diff --git a/tests/ovn.at b/tests/ovn.at
> index 0fe2527..34fdd5d 100644
> --- a/tests/ovn.at
> +++ b/tests/ovn.at
> @@ -912,6 +912,11 @@ done
>  # set address for lp13 with invalid characters.
>  # lp13 should be configured with only 192.168.0.13.
>  ovn-nbctl lsp-set-addresses lp13 "f0:00:00:00:00:13 192.168.0.13
> invalid 192.169.0.13"
> +
> +# Allow some time for ovn-northd and ovn-controller to catch up.
> +# XXX This should be more systematic.
> +sleep 1
> +
>  sip=`ip_to_hex 192 168 0 11`
>  tip=`ip_to_hex 192 168 0 13`
>  test_arp 11 f00000000011  $sip $tip f00000000013
> @@ -2494,6 +2499,10 @@ as hv1 ovs-ofctl dump-flows br-int
>  #Disable router R1
>  ovn-nbctl set Logical_Router R1 enabled=false
>
> +# Allow some time for ovn-northd and ovn-controller to catch up.
> +# XXX This should be more systematic.
> +sleep 1
> +
>  echo "---------SB dump-----"
>  ovn-sbctl list datapath_binding
>  echo "---------------------"
> --
> 2.1.3

works for me, so...

Acked-by: Ryan Moats <rmoats@us.ibm.com>
Ben Pfaff July 29, 2016, 4:44 a.m. UTC | #2
On Thu, Jul 28, 2016 at 10:02:53PM -0500, Ryan Moats wrote:
> "dev" <dev-bounces@openvswitch.org> wrote on 07/27/2016 02:03:22 AM:
> 
> > From: Ben Pfaff <blp@ovn.org>
> > To: dev@openvswitch.org
> > Cc: Ben Pfaff <blp@ovn.org>
> > Date: 07/27/2016 02:03 AM
> > Subject: [ovs-dev] [PATCH 2/5] ovn: Make two end-to-end tests more
> reliable.
> > Sent by: "dev" <dev-bounces@openvswitch.org>
> >
> > These tests change the northbound configuration and then immediately
> check
> > that the changes have taken effect on the hypervisors.  This can't work
> > reliably, so add a sleep to each one.
> >
> > Signed-off-by: Ben Pfaff <blp@ovn.org>
> > ---
> >  tests/ovn.at | 9 +++++++++
> >  1 file changed, 9 insertions(+)
> >
> > diff --git a/tests/ovn.at b/tests/ovn.at
> > index 0fe2527..34fdd5d 100644
> > --- a/tests/ovn.at
> > +++ b/tests/ovn.at
> > @@ -912,6 +912,11 @@ done
> >  # set address for lp13 with invalid characters.
> >  # lp13 should be configured with only 192.168.0.13.
> >  ovn-nbctl lsp-set-addresses lp13 "f0:00:00:00:00:13 192.168.0.13
> > invalid 192.169.0.13"
> > +
> > +# Allow some time for ovn-northd and ovn-controller to catch up.
> > +# XXX This should be more systematic.
> > +sleep 1
> > +
> >  sip=`ip_to_hex 192 168 0 11`
> >  tip=`ip_to_hex 192 168 0 13`
> >  test_arp 11 f00000000011  $sip $tip f00000000013
> > @@ -2494,6 +2499,10 @@ as hv1 ovs-ofctl dump-flows br-int
> >  #Disable router R1
> >  ovn-nbctl set Logical_Router R1 enabled=false
> >
> > +# Allow some time for ovn-northd and ovn-controller to catch up.
> > +# XXX This should be more systematic.
> > +sleep 1
> > +
> >  echo "---------SB dump-----"
> >  ovn-sbctl list datapath_binding
> >  echo "---------------------"
> > --
> > 2.1.3
> 
> works for me, so...
> 
> Acked-by: Ryan Moats <rmoats@us.ibm.com>
> 

Thanks, applied.
diff mbox

Patch

diff --git a/tests/ovn.at b/tests/ovn.at
index 0fe2527..34fdd5d 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -912,6 +912,11 @@  done
 # set address for lp13 with invalid characters.
 # lp13 should be configured with only 192.168.0.13.
 ovn-nbctl lsp-set-addresses lp13 "f0:00:00:00:00:13 192.168.0.13 invalid 192.169.0.13"
+
+# Allow some time for ovn-northd and ovn-controller to catch up.
+# XXX This should be more systematic.
+sleep 1
+
 sip=`ip_to_hex 192 168 0 11`
 tip=`ip_to_hex 192 168 0 13`
 test_arp 11 f00000000011  $sip $tip f00000000013
@@ -2494,6 +2499,10 @@  as hv1 ovs-ofctl dump-flows br-int
 #Disable router R1
 ovn-nbctl set Logical_Router R1 enabled=false
 
+# Allow some time for ovn-northd and ovn-controller to catch up.
+# XXX This should be more systematic.
+sleep 1
+
 echo "---------SB dump-----"
 ovn-sbctl list datapath_binding
 echo "---------------------"