From 546f166861b298a83469724fa8162c944d500aae Mon Sep 17 00:00:00 2001 From: Anant Kishor Sharma Date: Wed, 10 Jul 2024 08:17:24 -0700 Subject: [PATCH] increase wait time for mocked dualtor mux state change config --- tests/dualtor/test_ipinip.py | 4 ++-- tests/dualtor/test_orchagent_standby_tor_downstream.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/dualtor/test_ipinip.py b/tests/dualtor/test_ipinip.py index af3f9d498e..1b2825f76a 100644 --- a/tests/dualtor/test_ipinip.py +++ b/tests/dualtor/test_ipinip.py @@ -24,7 +24,7 @@ from tests.common.dualtor.mux_simulator_control import toggle_all_simulator_ports_to_rand_unselected_tor # noqa F401 from tests.common.dualtor.tunnel_traffic_utils import tunnel_traffic_monitor # noqa F401 from tests.common.helpers.assertions import pytest_require -from tests.common.utilities import is_ipv4_address, wait_until +from tests.common.utilities import is_ipv4_address, wait_until, wait from tests.common.fixtures.ptfhost_utils import run_icmp_responder # noqa F401 from tests.common.fixtures.ptfhost_utils import run_garp_service # noqa F401 from tests.common.fixtures.ptfhost_utils import change_mac_addresses # noqa F401 @@ -116,7 +116,7 @@ def stop_garp(ptfhost): if is_t0_mocked_dualtor(tbinfo): # noqa F405 request.getfixturevalue('apply_active_state_to_orchagent') - time.sleep(30) + wait(60, 'wait for config push/mux state change on mocked dualtor') else: request.getfixturevalue('toggle_all_simulator_ports_to_rand_selected_tor') diff --git a/tests/dualtor/test_orchagent_standby_tor_downstream.py b/tests/dualtor/test_orchagent_standby_tor_downstream.py index 7064e1e3b4..15d989ac40 100644 --- a/tests/dualtor/test_orchagent_standby_tor_downstream.py +++ b/tests/dualtor/test_orchagent_standby_tor_downstream.py @@ -24,7 +24,7 @@ from tests.common.dualtor.server_traffic_utils import ServerTrafficMonitor from tests.common.dualtor.mux_simulator_control import toggle_all_simulator_ports # noqa: F401 from tests.common.dualtor.tor_failure_utils import shutdown_bgp_sessions # noqa: F401 -from tests.common.utilities import wait_until +from tests.common.utilities import wait_until, wait from tests.common.fixtures.tacacs import tacacs_creds, setup_tacacs # noqa F401 @@ -361,7 +361,7 @@ def monitor_tunnel_and_server_traffic(torhost, expect_tunnel_traffic=True, expec logger.info("Step 1.1: Add route to a nexthop which is a standby Neighbor") set_mux_state(rand_selected_dut, tbinfo, 'standby', tor_mux_intfs, toggle_all_simulator_ports) add_nexthop_routes(rand_selected_dut, random_dst_ip, nexthops=[target_server]) - time.sleep(30) + wait(60, 'wait for config push/mux state change on mocked dualtor') logger.info("Step 1.2: Verify traffic to this route dst is forwarded to Active ToR and equally distributed") check_tunnel_balance(**test_params) monitor_tunnel_and_server_traffic(rand_selected_dut, expect_server_traffic=False, expect_tunnel_traffic=True) @@ -369,14 +369,14 @@ def monitor_tunnel_and_server_traffic(torhost, expect_tunnel_traffic=True, expec logger.info("Stage 2: Verify Active Forwarding") logger.info("Step 2.1: Simulate Mux state change to active") set_mux_state(rand_selected_dut, tbinfo, 'active', tor_mux_intfs, toggle_all_simulator_ports) - time.sleep(30) + wait(60, 'wait for config push/mux state change on mocked dualtor') logger.info("Step 2.2: Verify traffic to this route dst is forwarded directly to server") monitor_tunnel_and_server_traffic(rand_selected_dut, expect_server_traffic=True, expect_tunnel_traffic=False) logger.info("Stage 3: Verify Standby Forwarding Again") logger.info("Step 3.1: Simulate Mux state change to standby") set_mux_state(rand_selected_dut, tbinfo, 'standby', tor_mux_intfs, toggle_all_simulator_ports) - time.sleep(30) + wait(60, 'wait for config push/mux state change on mocked dualtor') logger.info("Step 3.2: Verify traffic to this route dst \ is now redirected back to Active ToR and equally distributed") monitor_tunnel_and_server_traffic(rand_selected_dut, expect_server_traffic=False, expect_tunnel_traffic=True)