Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

increase wait time for mocked T0 DToR TC failures due to config push delta #13625

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions tests/dualtor/test_ipinip.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -115,7 +115,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')
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the reason to change sleep to wait?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kevinskwang , changed it just for consistency(and a msg) after observing that we are using wait instead of sleep at other places.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kevinskwang , do we want to change it back to sleep?

else:
request.getfixturevalue('toggle_all_simulator_ports_to_rand_selected_tor')

Expand Down
8 changes: 4 additions & 4 deletions tests/dualtor/test_orchagent_standby_tor_downstream.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


pytestmark = [
Expand Down Expand Up @@ -360,22 +360,22 @@ 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)

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)
Expand Down
Loading