Account for control character as part of zmq_read_part #906
Azure Pipelines / Azure.sonic-swss-common
succeeded
Aug 29, 2024 in 5h 33m 49s
Build #20240828.3 had test failures
Details
- Failed: 1 (0.06%)
- Passed: 1,473 (93.76%)
- Other: 97 (6.17%)
- Total: 1,571
- 4072 of 6878 branches covered (59.20%)
- 4714 of 5785 lines covered (81.49%)
Annotations
Check failure on line 1 in test_add_remove_neg_admin_status
azure-pipelines / Azure.sonic-swss-common
test_add_remove_neg_admin_status
AssertionError: Unexpected number of keys: expected=33, received=34 (('oid:0x100000000001c', 'oid:0x100000000000c', 'oid:0x1000000000017', 'oid:0x100000000001f', 'oid:0x1000000000004', 'oid:0x1000000000018', 'oid:0x100000000000e', 'oid:0x1000000000008', 'oid:0x100000000000d', 'oid:0x1000000000020', 'oid:0x1000000000003', 'oid:0x1000000000015', 'oid:0x1000000000005', 'oid:0x1000000000002', 'oid:0x100000000001e', 'oid:0x1000000000009', 'oid:0x1000000000010', 'oid:0x100000000000f', 'oid:0x1000000000007', 'oid:0x1000000000012', 'oid:0x1000000000013', 'oid:0x1000000000001', 'oid:0x1000000000006', 'oid:0x100000000001d', 'oid:0x100000000001a', 'oid:0x1000000000011', 'oid:0x100000000000a', 'oid:0x1000000000019', 'oid:0x1000000000016', 'oid:0x1000000000014', 'oid:0x100000000000b', 'oid:0x1000000000614', 'oid:0x1000000000021', 'oid:0x100000000001b')), table="ASIC_STATE:SAI_OBJECT_TYPE_PORT"
Raw output
self = <test_port_add_remove.TestPortAddRemoveInvalidParam object at 0x7fa31797b970>
testlog = None
def test_add_remove_neg_admin_status(self, testlog):
qualifiers = { "admin_status": "" }
self.verify_add_remove(qualifiers)
qualifiers = { "admin_status": "invalid" }
> self.verify_add_remove(qualifiers)
test_port_add_remove.py:525:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
test_port_add_remove.py:419: in verify_add_remove
self.dvs_port.verify_port_count(port_asicdb_count, self.dvs_port.ASIC_DB)
dvslib/dvs_port.py:95: in verify_port_count
self.get_port_ids(expected, dbid)
dvslib/dvs_port.py:87: in get_port_ids
return conn.wait_for_n_keys(table, expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <dvslib.dvs_database.DVSDatabase object at 0x7fa3177df4f0>
table_name = 'ASIC_STATE:SAI_OBJECT_TYPE_PORT', num_keys = 33
wait_at_least_n_keys = False
polling_config = PollingConfig(polling_interval=0.01, timeout=20.0, strict=True)
failure_message = None
def wait_for_n_keys(
self,
table_name: str,
num_keys: int,
wait_at_least_n_keys: bool = False,
polling_config: PollingConfig = PollingConfig(),
failure_message: str = None,
) -> List[str]:
"""Wait for the specified number of keys to exist in the table.
Args:
table_name: The name of the table from which to fetch the keys.
num_keys: The expected number of keys to retrieve from the table.
polling_config: The parameters to use to poll the db.
failure_message: The message to print if the call times out. This will only take effect
if the PollingConfig is set to strict.
Returns:
The keys stored in the table. If no keys are found, then an empty List is returned.
"""
def access_function():
keys = self.get_keys(table_name)
if wait_at_least_n_keys:
return (len(keys) >= num_keys, keys)
else:
return (len(keys) == num_keys, keys)
status, result = wait_for_result(
access_function, self._disable_strict_polling(polling_config)
)
if not status:
message = failure_message or (
f"Unexpected number of keys: expected={num_keys}, received={len(result)} "
f'({result}), table="{table_name}"'
)
> assert not polling_config.strict, message
E AssertionError: Unexpected number of keys: expected=33, received=34 (('oid:0x100000000001c', 'oid:0x100000000000c', 'oid:0x1000000000017', 'oid:0x100000000001f', 'oid:0x1000000000004', 'oid:0x1000000000018', 'oid:0x100000000000e', 'oid:0x1000000000008', 'oid:0x100000000000d', 'oid:0x1000000000020', 'oid:0x1000000000003', 'oid:0x1000000000015', 'oid:0x1000000000005', 'oid:0x1000000000002', 'oid:0x100000000001e', 'oid:0x1000000000009', 'oid:0x1000000000010', 'oid:0x100000000000f', 'oid:0x1000000000007', 'oid:0x1000000000012', 'oid:0x1000000000013', 'oid:0x1000000000001', 'oid:0x1000000000006', 'oid:0x100000000001d', 'oid:0x100000000001a', 'oid:0x1000000000011', 'oid:0x100000000000a', 'oid:0x1000000000019', 'oid:0x1000000000016', 'oid:0x1000000000014', 'oid:0x100000000000b', 'oid:0x1000000000614', 'oid:0x1000000000021', 'oid:0x100000000001b')), table="ASIC_STATE:SAI_OBJECT_TYPE_PORT"
dvslib/dvs_database.py:414: AssertionError
Loading