From d71f44badb72ad9c1ce63afc2f6e507d318b6997 Mon Sep 17 00:00:00 2001 From: Javier-Tan <47554099+Javier-Tan@users.noreply.github.com> Date: Fri, 10 Jan 2025 03:00:11 +0000 Subject: [PATCH 1/2] [common/fixtures/duthost_utils.py] Increase timeout for wait_bgp_sessions for supervisor duts * Add check to increase timeout to 900 if duthost is a supervisor Signed-off-by: Javier Tan javiertan@microsoft.com --- tests/common/fixtures/duthost_utils.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/common/fixtures/duthost_utils.py b/tests/common/fixtures/duthost_utils.py index e906989b93a..338485269a4 100644 --- a/tests/common/fixtures/duthost_utils.py +++ b/tests/common/fixtures/duthost_utils.py @@ -624,6 +624,10 @@ def wait_bgp_sessions(duthost, timeout=120): A helper function to wait bgp sessions on DUT """ bgp_neighbors = duthost.get_bgp_neighbors_per_asic(state="all") + if duthost.is_supervisor_node(): + timeout = 900 + logging.info("Wait until all bgp sessions are up in {} sec" + .format(timeout)) pytest_assert( wait_until(timeout, 10, 0, duthost.check_bgp_session_state_all_asics, bgp_neighbors), "Not all bgp sessions are established after config reload", From f12b9537ce7654ca84dbc7fa731b52389549141f Mon Sep 17 00:00:00 2001 From: Javier-Tan <47554099+Javier-Tan@users.noreply.github.com> Date: Tue, 14 Jan 2025 23:03:03 +0000 Subject: [PATCH 2/2] [common/fixtures/duthost_utils.py] Change wait_bgp_sessions increase to T2 * Change increase for timeout for supervisor nodes to increase for all T2 duts Signed-off-by: Javier Tan javiertan@microsoft.com --- tests/common/fixtures/duthost_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common/fixtures/duthost_utils.py b/tests/common/fixtures/duthost_utils.py index 338485269a4..82d42c2bf6c 100644 --- a/tests/common/fixtures/duthost_utils.py +++ b/tests/common/fixtures/duthost_utils.py @@ -624,7 +624,7 @@ def wait_bgp_sessions(duthost, timeout=120): A helper function to wait bgp sessions on DUT """ bgp_neighbors = duthost.get_bgp_neighbors_per_asic(state="all") - if duthost.is_supervisor_node(): + if duthost.get_facts().get("modular_chassis"): timeout = 900 logging.info("Wait until all bgp sessions are up in {} sec" .format(timeout))