diff mbox series

[ovs-dev,07/15] tests: fixed multiple tests missing ovn-nbctl "wait"

Message ID 20230918164714.3144984-8-xsimonar@redhat.com
State Accepted
Headers show
Series Fixed another set of flaky Unit Tests | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed
ovsrobot/github-robot-_ovn-kubernetes fail github build: failed

Commit Message

Xavier Simonart Sept. 18, 2023, 4:47 p.m. UTC
- dhcpv4 : 1 HV, 2 LS
- Remote port binding
- MLD snoop/querier/relay
- basic connectivity with multiple requested-chassis

Signed-off-by: Xavier Simonart <xsimonar@redhat.com>
---
 tests/ovn-northd.at |  2 +-
 tests/ovn.at        | 15 +++++++++++----
 2 files changed, 12 insertions(+), 5 deletions(-)
diff mbox series

Patch

diff --git a/tests/ovn-northd.at b/tests/ovn-northd.at
index 13c8a0d42..f51e29b11 100644
--- a/tests/ovn-northd.at
+++ b/tests/ovn-northd.at
@@ -10340,7 +10340,7 @@  wait_for_ports_up sw0-r1
 check_column $remote_chassis_uuid Port_Binding chassis logical_port=sw0-r1
 
 # Set the type to router and ovn-northd should not claim it.
-check ovn-nbctl lsp-set-type sw0-r1 router
+check ovn-nbctl --wait=hv lsp-set-type sw0-r1 router
 check_column '' Port_Binding chassis logical_port=sw0-r1
 
 AT_CLEANUP
diff --git a/tests/ovn.at b/tests/ovn.at
index eb0ca82b1..b1bdae7d2 100644
--- a/tests/ovn.at
+++ b/tests/ovn.at
@@ -7169,7 +7169,7 @@  ovn-nbctl dhcp-options-set-options $d3 \
    lease_time=3600 router=10.0.0.1 bootfile_name_alt=\"bootfile_name_alt\" \
    bootfile_name=\"bootfile\"
 
-ovn-nbctl lsp-set-dhcpv4-options ls1-lp1 $d3
+ovn-nbctl --wait=hv lsp-set-dhcpv4-options ls1-lp1 $d3
 
 offer_ip=`ip_to_hex 10 0 0 4`
 server_ip=`ip_to_hex 10 0 0 1`
@@ -7535,7 +7535,7 @@  ovn-nbctl dhcp-options-set-options $d1 \
     server_id=00:00:00:10:00:01 \
     bootfile_name_alt=\"bootfile_name_alt\" \
     bootfile_name=\"bootfile_name\"
-ovn-nbctl lsp-set-dhcpv6-options ls1-lp2 ${d1}
+ovn-nbctl --wait=hv lsp-set-dhcpv6-options ls1-lp2 ${d1}
 
 reset_pcap_file hv1-vif2 hv1/vif2
 
@@ -14811,6 +14811,10 @@  wait_column "$hv2_uuid" Port_Binding requested_additional_chassis logical_port=m
 # ovn-installed on hv2 should guarantee that.
 OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"'])
 
+# Still, this does not guarantee that all flows are installed on hv3: hv3 (might) still need to receive and handle
+# additional_chassis for migrator port
+ovn-nbctl --wait=hv sync
+
 # check that...
 # unicast from First arrives to hv1:Migrator
 # unicast from First arrives to hv2:Migrator
@@ -14897,6 +14901,9 @@  wait_column "" Port_Binding requested_additional_chassis logical_port=migrator
 # For instance, migrator port might still be up from prior to complete migration to hv2
 OVS_WAIT_UNTIL([test `as hv2 ovs-vsctl get Interface migrator external_ids:ovn-installed` = '"true"'])
 
+# Give time for hv3 to handle the change of Port_Binding  for migrator port
+ovn-nbctl --wait=hv sync
+
 # check that...
 # unicast from Third doesn't arrive to hv1:Migrator
 # unicast from Third arrives to hv2:Migrator
@@ -23324,7 +23331,7 @@  check ovn-nbctl set Logical_Switch sw2 \
     other_config:mcast_querier="false"
 
 # Enable multicast snooping on sw3.
-check ovn-nbctl --wait=sb set Logical_Switch sw3       \
+check ovn-nbctl --wait=hv set Logical_Switch sw3       \
     other_config:mcast_querier="false" \
     other_config:mcast_snoop="true"
 
@@ -23363,7 +23370,7 @@  OVS_WAIT_UNTIL(
   [$at_diff -F'^---' exp rcv])
 
 # Enable multicast relay on rtr
-check ovn-nbctl --wait=sb set logical_router rtr options:mcast_relay="true"
+check ovn-nbctl --wait=hv set logical_router rtr options:mcast_relay="true"
 
 AT_CAPTURE_FILE([sbflows6])
 ovn-sbctl dump-flows > sbflows6