Skip to content

Commit

Permalink
waiting for asic entries
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Dancejic <ndancejic@microsoft.com>
  • Loading branch information
Ndancejic committed Jan 31, 2023
1 parent bfd2130 commit 190754a
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tests/test_mux.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,8 @@ def create_and_test_NH_routes(self, appdb, asicdb, dvs, dvs_route, mac):
self.set_mux_state(appdb, "Ethernet0", "active")
self.add_neighbor(dvs, neigh_ip, mac)
self.add_neighbor(dvs, neigh_ipv6, mac)
time.sleep(1)
asicdb.wait_for_entry(self.ASIC_NEIGH_TABLE, neigh_ip)
asicdb.wait_for_entry(self.ASIC_NEIGH_TABLE, neigh_ipv6)
dvs.runcmd(
"vtysh -c \"configure terminal\" -c \"ip route " + nh_route +
" " + neigh_ip + "\""
Expand All @@ -561,6 +562,7 @@ def create_and_test_NH_routes(self, appdb, asicdb, dvs, dvs_route, mac):
" " + neigh_ipv6 + "\""
)
apdb.wait_for_entry("ROUTE_TABLE", nh_route)

rtkeys = dvs_route.check_asicdb_route_entries([nh_route])
rtkeys_ipv6 = dvs_route.check_asicdb_route_entries([nh_route_ipv6])
self.check_nexthop_in_asic_db(asicdb, rtkeys[0])
Expand All @@ -573,7 +575,9 @@ def create_and_test_NH_routes(self, appdb, asicdb, dvs, dvs_route, mac):

self.del_neighbor(dvs, neigh_ip)
self.del_neighbor(dvs, neigh_ipv6)
time.sleep(1)
asicdb.wait_for_deleted_entry(self.ASIC_NEIGH_TABLE, neigh_ip)
asicdb.wait_for_deleted_entry(self.ASIC_NEIGH_TABLE, neigh_ipv6)

self.check_nexthop_in_asic_db(asicdb, rtkeys[0], True)
self.check_nexthop_in_asic_db(asicdb, rtkeys_ipv6[0], True)

Expand All @@ -584,7 +588,9 @@ def create_and_test_NH_routes(self, appdb, asicdb, dvs, dvs_route, mac):

self.add_neighbor(dvs, neigh_ip, mac)
self.add_neighbor(dvs, neigh_ipv6, mac)
time.sleep(1)
asicdb.wait_for_entry(self.ASIC_NEIGH_TABLE, neigh_ip)
asicdb.wait_for_entry(self.ASIC_NEIGH_TABLE, neigh_ipv6)

self.check_nexthop_in_asic_db(asicdb, rtkeys[0])
self.check_nexthop_in_asic_db(asicdb, rtkeys_ipv6[0])
dvs.runcmd(
Expand Down

0 comments on commit 190754a

Please sign in to comment.