Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ def run_lossless_response_to_external_pause_storms_test(api,
total_rx_pkts = rx_pkts_1 + rx_pkts_2
# Calculate the drop percentage
drop_percentage = 100 * pkt_drop / total_rx_pkts
pytest_assert(ceil(drop_percentage) == 0, 'FAIL: There should be no packet drops in ingress dut counters')
pytest_assert(round(drop_percentage) == 0, 'FAIL: There should be no packet drops in ingress dut counters')

verify_external_pause_storm_result(flow_stats,
tx_port,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def run_lossless_response_to_throttling_pause_storms_test(api,
total_rx_pkts = rx_pkts_1 + rx_pkts_2
# Calculate the drop percentage
drop_percentage = 100 * pkt_drop / total_rx_pkts
pytest_assert(ceil(drop_percentage) == 0, 'FAIL: There should be no packet drops in ingress dut counters')
pytest_assert(round(drop_percentage) == 0, 'FAIL: There should be no packet drops in ingress dut counters')

""" Verify Results """
verify_throttling_pause_storm_result(flow_stats,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import logging # noqa: F401
from math import ceil
from tests.common.helpers.assertions import pytest_assert, pytest_require # noqa: F401
from tests.common.fixtures.conn_graph_facts import conn_graph_facts, fanout_graph_facts # noqa: F401
from tests.common.snappi_tests.snappi_helpers import get_dut_port_id # noqa: F401
Expand Down Expand Up @@ -143,7 +142,7 @@ def run_m2o_fluctuating_lossless_test(api,
total_rx_pkts = rx_pkts_1 + rx_pkts_2
# Calculate the drop percentage
drop_percentage = 100 * pkt_drop / total_rx_pkts
pytest_assert(ceil(drop_percentage) == 8, 'FAIL: Drop packets must be around 8 percent')
pytest_assert(round(drop_percentage) == 8, 'FAIL: Drop packets must be around 8 percent')

""" Verify Results """
verify_m2o_fluctuating_lossless_result(flow_stats,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def run_m2o_oversubscribe_lossless_test(api,
total_rx_pkts = rx_pkts_1 + rx_pkts_2
# Calculate the drop percentage
drop_percentage = 100 * pkt_drop / total_rx_pkts
pytest_assert(ceil(drop_percentage) == 0, 'FAIL: There should be no packet drops in ingress dut counters')
pytest_assert(round(drop_percentage) == 0, 'FAIL: There should be no packet drops in ingress dut counters')

""" Verify Results """
verify_m2o_oversubscribe_lossless_result(flow_stats,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def run_pfc_m2o_oversubscribe_lossless_lossy_test(api,
total_rx_pkts = rx_pkts_1 + rx_pkts_2
# Calculate the drop percentage
drop_percentage = 100 * pkt_drop / total_rx_pkts
pytest_assert(ceil(drop_percentage) == 5, 'FAIL: Drop packets must be around 5 percent')
pytest_assert(round(drop_percentage) == 5, 'FAIL: Drop packets must be around 5 percent')

""" Verify Results """
verify_m2o_oversubscribe_lossless_lossy_result(flow_stats,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def run_pfc_m2o_oversubscribe_lossy_test(api,
total_rx_pkts = rx_pkts_1 + rx_pkts_2
# Calculate the drop percentage
drop_percentage = 100 * pkt_drop / total_rx_pkts
pytest_assert(ceil(drop_percentage) == 10, 'FAIL: Drop packets must be around 10 percent')
pytest_assert(round(drop_percentage) == 10, 'FAIL: Drop packets must be around 10 percent')

""" Verify Results """
verify_m2o_oversubscribe_lossy_result(flow_stats,
Expand Down
Loading