Skip to content

Commit

Permalink
Add sleep to ensure starting route perf test after the vs is stable (s…
Browse files Browse the repository at this point in the history
…onic-net#1929)

*Add sleep in route perf test to ensure the test starts when route table is stable.
  • Loading branch information
shi-su authored Sep 24, 2021
1 parent a89d1f8 commit a8fcadf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/test_route.py
Original file line number Diff line number Diff line change
Expand Up @@ -930,12 +930,14 @@ def test_PerfAddRemoveRoute(self, dvs, testlog):

dvs.servers[1].runcmd("ip address add 10.0.0.3/31 dev eth0")
dvs.servers[1].runcmd("ip route add default via 10.0.0.2")
time.sleep(2)

fieldValues = [{"nexthop": "10.0.0.1", "ifname": "Ethernet0"}, {"nexthop": "10.0.0.3", "ifname": "Ethernet4"}]

# get neighbor and arp entry
dvs.servers[0].runcmd("ping -c 1 10.0.0.3")
dvs.servers[1].runcmd("ping -c 1 10.0.0.1")
time.sleep(2)

# get number of routes before adding new routes
startNumRoutes = len(self.adb.get_keys("ASIC_STATE:SAI_OBJECT_TYPE_ROUTE_ENTRY"))
Expand Down

0 comments on commit a8fcadf

Please sign in to comment.