From a8fcadfb58f5d1fa3a68ff4814a8d48441410bdc Mon Sep 17 00:00:00 2001 From: Shi Su <67605788+shi-su@users.noreply.github.com> Date: Thu, 23 Sep 2021 20:36:26 -0700 Subject: [PATCH] Add sleep to ensure starting route perf test after the vs is stable (#1929) *Add sleep in route perf test to ensure the test starts when route table is stable. --- tests/test_route.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_route.py b/tests/test_route.py index 56d3af5c5b9e..b6dff14cfe21 100644 --- a/tests/test_route.py +++ b/tests/test_route.py @@ -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"))