Skip to content

Commit 6392d3b

Browse files
author
vedganes
committed
[vstest] Code review comments fix - 1
Changes done to remove comments and LGTM warnings. Signed-off-by: vedganes <[email protected]>
1 parent daf8848 commit 6392d3b

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

tests/conftest.py

+3-15
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,7 @@
3333
# a dynamic number of ports. GitHub Issue: Azure/sonic-swss#1384.
3434
NUM_PORTS = 32
3535

36-
# FIXME: Voq asics will have 16 fabric ports created (defined in Azure/sonic-buildimage#6185).
37-
# Right now, we set FABRIC_NUM_PORTS to 0, and change to 16 when PR#6185 merges. PR#6185 can't
38-
# be merged before this PR. Otherwise it will cause swss voq test failures.
36+
# Voq asics will have 16 fabric ports created (defined in Azure/sonic-buildimage#7629).
3937
FABRIC_NUM_PORTS = 16
4038

4139
def ensure_system(cmd):
@@ -518,22 +516,12 @@ def _polling_function():
518516

519517
# Verify that all ports have been created
520518
asic_db = self.get_asic_db()
521-
522-
# Verify that we have "at least" NUM_PORTS + FABRIC_NUM_PORTS, rather exact number.
523-
# Right now, FABRIC_NUM_PORTS = 0. So it essentially waits for at least NUM_PORTS.
524-
# This will allow us to merge Azure/sonic-buildimage#6185 that creates 16 fabric ports.
525-
# When PR#6185 merges, FABRIC_NUM_PORTS should be 16, and so this verification (at least
526-
# NUM_PORTS) still holds.
527-
# Will update FABRIC_NUM_PORTS to 16, and revert back to wait exact NUM_PORTS + FABRIC_NUM_PORTS
528-
# when PR#6185 merges.
529-
wait_at_least_n_keys = True
530-
531-
asic_db.wait_for_n_keys("ASIC_STATE:SAI_OBJECT_TYPE_PORT", num_ports + 1, wait_at_least_n_keys) # +1 CPU Port
519+
asic_db.wait_for_n_keys("ASIC_STATE:SAI_OBJECT_TYPE_PORT", num_ports + 1) # +1 CPU Port
532520

533521
# Verify that fabric ports are monitored in STATE_DB
534522
if metadata.get('switch_type', 'npu') in ['voq', 'fabric']:
535523
self.get_state_db()
536-
self.state_db.wait_for_n_keys("FABRIC_PORT_TABLE", FABRIC_NUM_PORTS, wait_at_least_n_keys)
524+
self.state_db.wait_for_n_keys("FABRIC_PORT_TABLE", FABRIC_NUM_PORTS)
537525

538526
def net_cleanup(self) -> None:
539527
"""Clean up network, remove extra links."""

tests/test_virtual_chassis.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import pytest
21
from swsscommon import swsscommon
32
from dvslib.dvs_database import DVSDatabase
43
import ast

0 commit comments

Comments
 (0)