Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
snappi_tests/multidut: Fixturize a few cases in pfc folder. (#15919)
Description of PR In continuation of reducing the time to run for pfc cases, this PR refactors some testcases from pfc folder to use the new fixtures: setup_ports_and_dut and disable_pfcwd. This reduces the runtime for each of these cases by 4-5 minutes, by avoiding the final config-reload from the sanity-checker-teardown kicking in. Approach What is the motivation for this PR? to reduce the runtime of the testcases. Reuse the code available in fixtures instead of writing same code in multiple cases. How did you do it? By removing the repeat code, and using the already established fixtures. How did you verify/test it? Ran it on my TB, all of them have passed. =============================================================================================== PASSES =============================================================================================== _______________________________________________________________ test_pfc_pause_single_lossless_prio[multidut_port_info0-yy39top-lc4|3] _______________________________________________________________ _______________________________________________________________ test_pfc_pause_single_lossless_prio[multidut_port_info0-yy39top-lc4|4] _______________________________________________________________ _______________________________________________________________ test_pfc_pause_single_lossless_prio[multidut_port_info1-yy39top-lc4|3] _______________________________________________________________ _______________________________________________________________ test_pfc_pause_single_lossless_prio[multidut_port_info1-yy39top-lc4|4] _______________________________________________________________ ------------------------------------------------------ generated xml file: /run_logs/ixia/rerun/2024-12-05-05-25-18/tr_2024-12-05-05-25-18.xml ------------------------------------------------------- INFO:root:Can not get Allure report URL. Please check logs --------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------- 05:59:34 __init__.pytest_terminal_summary L0067 INFO | Can not get Allure report URL. Please check logs ====================================================================================== short test summary info ======================================================================================= PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio[multidut_port_info0-yy39top-lc4|3] PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio[multidut_port_info0-yy39top-lc4|4] PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio[multidut_port_info1-yy39top-lc4|3] PASSED snappi_tests/multidut/pfc/test_multidut_pfc_pause_lossless_with_snappi.py::test_pfc_pause_single_lossless_prio[multidut_port_info1-yy39top-lc4|4] ============================================================================= 4 passed, 7 warnings in 2054.37s (0:34:14) ============================================================================= sonic@snappi-sonic-mgmt-vanilla-202405-t2:/data/tests$ m2o_fluctuating_lossless: --------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------- 06:41:29 __init__.pytest_terminal_summary L0067 INFO | Can not get Allure report URL. Please check logs ====================================================================================== short test summary info ======================================================================================= PASSED snappi_tests/multidut/pfc/test_m2o_fluctuating_lossless.py::test_m2o_fluctuating_lossless[multidut_port_info0] PASSED snappi_tests/multidut/pfc/test_m2o_fluctuating_lossless.py::test_m2o_fluctuating_lossless[multidut_port_info1] ============================================================================= 2 passed, 5 warnings in 410.73s (0:06:50) ============================================================================== sonic@snappi-sonic-mgmt-vanilla-202405-t2:/data/tests$ 9. snappi_tests/multidut/pfc/test_m2o_fluctuating_lossless.py test_m2o_fluctuating_lossless[multidut_port_info0] --------------------------------------------------------------------------------------- live log sessionfinish --------------------------------------------------------------------------------------- 06:55:40 __init__.pytest_terminal_summary L0067 INFO | Can not get Allure report URL. Please check logs ====================================================================================== short test summary info ======================================================================================= PASSED snappi_tests/multidut/pfc/test_lossless_response_to_external_pause_storms.py::test_lossless_response_to_external_pause_storms_test[multidut_port_info0] PASSED snappi_tests/multidut/pfc/test_lossless_response_to_external_pause_storms.py::test_lossless_response_to_external_pause_storms_test[multidut_port_info1] ============================================================================= 2 passed, 5 warnings in 424.78s (0:07:04) ============================================================================== sonic@snappi-sonic-mgmt-vanilla-202405-t2:/data/tests$ co-authorized by: jianquanye@microsoft.com
- Loading branch information