Skip to content

Commit

Permalink
Increase the sleep time after change the interface status (#15517)
Browse files Browse the repository at this point in the history
Signed-off-by: Kevin Wang <shengkaiwang@microsoft.com>
  • Loading branch information
kevinskwang authored and mssonicbld committed Nov 15, 2024
1 parent 528ccfe commit de7658e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/fdb/test_fdb_mac_learning.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def testFdbMacLearning(self, ptfadapter, duthosts, rand_one_dut_hostname, ptfhos
# unshut 1 port and populate fdb for that port. make sure fdb entry is populated in mac table
duthost = duthosts[rand_one_dut_hostname]
duthost.shell("sudo config interface startup {}".format(target_ports_to_ptf_mapping[0][0]))
time.sleep(10)
time.sleep(30)
self.dynamic_fdb_oper(duthost, tbinfo, ptfhost, [target_ports_to_ptf_mapping[0]])
pytest_assert(wait_until(300, 2, 1, fdb_table_has_dummy_mac_for_interface, duthost,
target_ports_to_ptf_mapping[0][0], self.DUMMY_MAC_PREFIX), "After starting {}"
Expand All @@ -209,7 +209,7 @@ def testFdbMacLearning(self, ptfadapter, duthosts, rand_one_dut_hostname, ptfhos
# unshut 3 more ports and populate fdb for those ports
duthost.shell("sudo config interface startup {}-{}".format(target_ports_to_ptf_mapping[1][0],
target_ports_to_ptf_mapping[3][0][8:]))
time.sleep(10)
time.sleep(30)
self.dynamic_fdb_oper(duthost, tbinfo, ptfhost, target_ports_to_ptf_mapping[1:])
for i in range(1, len(target_ports_to_ptf_mapping)):
pytest_assert(wait_until(300, 2, 1, fdb_table_has_dummy_mac_for_interface, duthost,
Expand All @@ -220,7 +220,7 @@ def testFdbMacLearning(self, ptfadapter, duthosts, rand_one_dut_hostname, ptfhos
# shutdown last 3 ports and make sure corresponding entries are gone from MAC address table
for i in range(1, len(target_ports_to_ptf_mapping)):
duthost.shell("sudo config interface shutdown {}".format(target_ports_to_ptf_mapping[i][0]))
time.sleep(10)
time.sleep(30)
for i in range(1, len(target_ports_to_ptf_mapping)):
pytest_assert(not (fdb_table_has_dummy_mac_for_interface(duthost, target_ports_to_ptf_mapping[i][0])),
"mac entry present when interface {} is down"
Expand Down

0 comments on commit de7658e

Please sign in to comment.