Skip to content

Commit 34b9f36

Browse files
authored
[vs]: Fix trimming test cases: avoid NULL OID polling (#3943)
Signed-off-by: Nazarii Hnydyn <[email protected]>
1 parent 8b8918a commit 34b9f36

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/dvslib/dvs_queue.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ class DVSQueue:
1717
COUNTERS_COUNTERS = "COUNTERS"
1818
COUNTERS_QUEUE_NAME_MAP = "COUNTERS_QUEUE_NAME_MAP"
1919

20+
OID_NULL = "oid:0x0"
21+
2022
def __init__(self, asic_db, config_db, counters_db):
2123
"""Create a new DVS queue manager."""
2224
self.asic_db = asic_db
@@ -48,6 +50,12 @@ def get_queue_buffer_profile_id(
4850
attr_list = [ field ]
4951
fvs = self.asic_db.wait_for_fields(self.ASIC_QUEUE, sai_queue_id, attr_list)
5052

53+
if fvs[field] == self.OID_NULL:
54+
attr_dict = {
55+
field: self.OID_NULL
56+
}
57+
fvs = self.asic_db.wait_for_field_negative_match(self.ASIC_QUEUE, sai_queue_id, attr_dict)
58+
5159
return fvs[field]
5260

5361
def get_queue_buffer_profile_name(

0 commit comments

Comments
 (0)