From b45355c2afdcf4f96b54ce5ac44962f03f6e742c Mon Sep 17 00:00:00 2001 From: Deepak Singhal <115033986+deepak-singhal0408@users.noreply.github.com> Date: Thu, 6 Feb 2025 10:05:53 -0800 Subject: [PATCH] T2-Snappi-Route-Conv: Update process crash Testcase (#16754) T2-Route Conv: Process Crash TC: Updated the test to accomodate new changes in the process crash scenario --- .../snappi_tests/multidut/bgp/files/bgp_outbound_helper.py | 7 ++++++- tests/snappi_tests/variables.py | 3 ++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/snappi_tests/multidut/bgp/files/bgp_outbound_helper.py b/tests/snappi_tests/multidut/bgp/files/bgp_outbound_helper.py index 86a613f7f33..73632be7326 100755 --- a/tests/snappi_tests/multidut/bgp/files/bgp_outbound_helper.py +++ b/tests/snappi_tests/multidut/bgp/files/bgp_outbound_helper.py @@ -21,7 +21,7 @@ snappi_portchannel_ipv4_list, snappi_portchannel_ipv6_list, AS_PATHS, \ BGP_TYPE, t1_side_interconnected_port, t2_side_interconnected_port, router_ids, \ snappi_community_for_t1, snappi_community_for_t1_drop, snappi_community_for_t2, num_regionalhubs, \ - SNAPPI_TRIGGER, DUT_TRIGGER, fanout_presence, t2_uplink_fanout_info # noqa: F401 + SNAPPI_TRIGGER, DUT_TRIGGER, DUT_TRIGGER_SHORT, fanout_presence, t2_uplink_fanout_info # noqa: F401 from tests.common.snappi_tests.variables import v6_prefix_length logger = logging.getLogger(__name__) @@ -1481,6 +1481,11 @@ def get_convergence_for_process_flap(duthosts, check_container_status_down(duthost, container, timeout=60) check_container_status_up(duthost, container, timeout=DUT_TRIGGER) wait(DUT_TRIGGER, "For Flows to be evenly distributed") + + # execute TSB command, to bring the traffic back + duthost.command("sudo TSB") + wait(DUT_TRIGGER_SHORT, "For TSB") + port_stats = get_port_stats(api) for port_stat in port_stats: if 'Snappi_Tx_Port' not in port_stat.name: diff --git a/tests/snappi_tests/variables.py b/tests/snappi_tests/variables.py index c2cef586681..e3a11e461d6 100644 --- a/tests/snappi_tests/variables.py +++ b/tests/snappi_tests/variables.py @@ -136,7 +136,8 @@ def get_host_addresses(subnet, count): T2_DUT_AS_NUM = 65100 BGP_TYPE = 'ebgp' SNAPPI_TRIGGER = 60 # timeout value for snappi operation -DUT_TRIGGER = 180 # timeout value for dut operation +DUT_TRIGGER = 180 # longer timeout value for dut operation +DUT_TRIGGER_SHORT = 60 # shorter timeout value for dut operation ipv4_subnet = '20.0.1.1/31' ipv6_subnet = '2000:1:1:1::1/126'