From 2aad1a2e92bef6d56b9a2d91c900832a33505d06 Mon Sep 17 00:00:00 2001 From: wumiao_nokia Date: Wed, 11 Dec 2024 04:24:52 -0500 Subject: [PATCH] Fix an issue of all lldp entries take some time to be in DB after reboot in scaling setup. (#15731) Fix an issue of all lldp entries take some time to be in DB after reboot in scaling setup --- tests/lldp/test_lldp_syncd.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/lldp/test_lldp_syncd.py b/tests/lldp/test_lldp_syncd.py index 975cd002d90..bfe629c6157 100644 --- a/tests/lldp/test_lldp_syncd.py +++ b/tests/lldp/test_lldp_syncd.py @@ -356,11 +356,6 @@ def test_lldp_entry_table_after_reboot( ): duthost = duthosts[enum_rand_one_per_hwsku_frontend_hostname] - # Verify LLDP_ENTRY_TABLE keys match show lldp table output at the start of test - keys_match = wait_until(30, 5, 0, check_lldp_table_keys, duthost, db_instance) - if not keys_match: - assert keys_match, "LLDP_ENTRY_TABLE keys do not match 'show lldp table' output" - # reboot logging.info("Run cold reboot on DUT") reboot( @@ -372,6 +367,12 @@ def test_lldp_entry_table_after_reboot( safe_reboot=True, check_intf_up_ports=True ) + + # Wait till we have all lldp entries in the DB after reboot. It's found in scaling + # setup this may take some time to happen. + keys_match = wait_until(90, 5, 30, check_lldp_table_keys, duthost, db_instance) + if not keys_match: + assert keys_match, "LLDP_ENTRY_TABLE keys do not match 'show lldp table' output" lldp_entry_keys = get_lldp_entry_keys(db_instance) lldpctl_output = get_lldpctl_output(duthost) show_lldp_table_int_list = get_show_lldp_table_output(duthost)