diff --git a/tests/bgp/test_bgp_queue.py b/tests/bgp/test_bgp_queue.py index 315ddb7d091..8463dc7e38e 100644 --- a/tests/bgp/test_bgp_queue.py +++ b/tests/bgp/test_bgp_queue.py @@ -1,6 +1,7 @@ import time import pytest import logging +from tests.common.dualtor.dual_tor_common import active_active_ports # noqa F401 logger = logging.getLogger(__name__) @@ -28,7 +29,8 @@ def get_queue_counters(asichost, port, queue): return -1 -def test_bgp_queues(duthosts, enum_frontend_dut_hostname, enum_asic_index, tbinfo): +def test_bgp_queues(duthosts, enum_frontend_dut_hostname, + enum_asic_index, tbinfo, active_active_ports): # noqaF811 duthost = duthosts[enum_frontend_dut_hostname] asichost = duthost.asic_instance(enum_asic_index) clear_queue_counters(asichost) @@ -70,6 +72,10 @@ def test_bgp_queues(duthosts, enum_frontend_dut_hostname, enum_asic_index, tbinf for port in mg_facts['minigraph_portchannels'][ifname]['members']: logger.info("PortChannel '{}' : port {}".format(ifname, port)) for q in range(0, 7): + # In case of active-active ports (dualtor-aa/dualtor-mixed) there will always be + # gRPC traffic flowing through UC1 + if 'dualtor' in tbinfo['topo']['name'] and active_active_ports and q == 1: + continue assert(get_queue_counters(asichost, port, q) == 0) else: logger.info(ifname) diff --git a/tests/common/dualtor/tunnel_traffic_utils.py b/tests/common/dualtor/tunnel_traffic_utils.py index 790a28f4fee..b76ac486bd7 100644 --- a/tests/common/dualtor/tunnel_traffic_utils.py +++ b/tests/common/dualtor/tunnel_traffic_utils.py @@ -13,6 +13,7 @@ from tests.common.utilities import dump_scapy_packet_show_output from tests.common.utilities import wait_until from tests.common.dualtor.dual_tor_utils import is_tunnel_qos_remap_enabled +from tests.common.dualtor.dual_tor_common import active_active_ports def dut_dscp_tc_queue_maps(duthost): @@ -245,8 +246,11 @@ def _disassemble_ip_tos(tos): return " ,".join(check_res) exp_queue = derive_queue_id_from_dscp(self.standby_tor, inner_dscp, True) logging.info("Expect queue: %s", exp_queue) - if not wait_until(60, 5, 0, queue_stats_check, self.standby_tor, exp_queue, self.packet_count): - check_res.append("no expect counter in the expected queue %s" % exp_queue) + # In case of active-active ports (dualtor-aa/dualtor-mixed) there will always be + # gRPC traffic flowing through UC1 + if exp_queue != 1 or not ('dualtor' in tbinfo['topo']['name'] and active_active_ports): + if not wait_until(60, 5, 0, queue_stats_check, self.standby_tor, exp_queue, self.packet_count): + check_res.append("no expect counter in the expected queue %s" % exp_queue) return " ,".join(check_res) def __init__(self, standby_tor, active_tor=None, existing=True, inner_packet=None,