Skip to content

Commit

Permalink
Skip queue counters check for UC1 in case of active-acitve links.
Browse files Browse the repository at this point in the history
UC1 will always have gRPC traffic flowing through if active-active links exist (dualtor-aa/dualtor-mixed), therefore, queue counters check for UC1 should be skipped in case of following tests if active-active links exist.

1. bgp/test_bgp_queue.py
2. dualtor/test_tor_ecn.py
  • Loading branch information
vivekverma-arista committed Mar 7, 2024
1 parent ebc056c commit 45cb9ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
8 changes: 7 additions & 1 deletion tests/bgp/test_bgp_queue.py
Original file line number Diff line number Diff line change
@@ -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__)

Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down
8 changes: 6 additions & 2 deletions tests/common/dualtor/tunnel_traffic_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 45cb9ed

Please sign in to comment.