Added detailed reason for assert failure for gnmi,snmp#19758
Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom Jul 30, 2025
Merged
Added detailed reason for assert failure for gnmi,snmp#19758StormLiangMS merged 1 commit intosonic-net:masterfrom
StormLiangMS merged 1 commit intosonic-net:masterfrom
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
/azpw run |
Collaborator
|
/AzurePipelines run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
ZhaohuiS
reviewed
Jul 24, 2025
tests/gnmi/test_gnmi_countersdb.py
Outdated
| "Expected count of 'oid': {}" | ||
| "Actual count of 'oid': {}" | ||
| "Message: {}" | ||
| ).format(test_data["name"], msg, exp_cnt, msg.count("oid"), msg) |
Contributor
There was a problem hiding this comment.
@bachalla don't need to print msg twice, please remove the last one.
Contributor
|
@bachalla could you please provide the test evidence? |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Jul 31, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally
Collaborator
|
Cherry-pick PR to 202505: #19953 |
11 tasks
mssonicbld
pushed a commit
that referenced
this pull request
Jul 31, 2025
Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally
nissampa
pushed a commit
to nissampa/sonic-mgmt_dpu_test
that referenced
this pull request
Aug 7, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally
ashutosh-agrawal
pushed a commit
to ashutosh-agrawal/sonic-mgmt
that referenced
this pull request
Aug 14, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally
vidyac86
pushed a commit
to vidyac86/sonic-mgmt
that referenced
this pull request
Oct 23, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally
opcoder0
pushed a commit
to opcoder0/sonic-mgmt
that referenced
this pull request
Dec 8, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally Signed-off-by: opcoder0 <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally Signed-off-by: Guy Shemesh <[email protected]>
AharonMalkin
pushed a commit
to AharonMalkin/sonic-mgmt
that referenced
this pull request
Dec 16, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Dec 21, 2025
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally Signed-off-by: Guy Shemesh <[email protected]>
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Jan 13, 2026
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally
gshemesh2
pushed a commit
to gshemesh2/sonic-mgmt
that referenced
this pull request
Jan 26, 2026
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally Signed-off-by: Guy Shemesh <[email protected]>
ytzur1
pushed a commit
to ytzur1/sonic-mgmt
that referenced
this pull request
Feb 2, 2026
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally Signed-off-by: Yael Tzur <[email protected]>
venu-nexthop
pushed a commit
to venu-nexthop/sonic-mgmt
that referenced
this pull request
Mar 27, 2026
) Summary: Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail. Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails. What is the motivation for this PR? The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance. How did you do it? I updated the assertion statements in the following test files to include descriptive error messages: tests/gnmi/test_gnmi_countersdb.py tests/snmp/test_snmp_lldp.py How did you verify/test it? Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Description of PR
Added detailed Reason for Assert failure
Type of change
Back port request
Summary:
Enhanced assertion messages in selected test cases to provide clearer failure context. This improves debuggability and speeds up issue resolution when tests fail.
Added detailed assertion failure messages in test scripts to make it easier to understand why tests fails.
What is the motivation for this PR?
The motivation is to improve test debuggability by adding detailed failure reasons in assertions for selected test cases. This enhancement makes it easier to identify the root cause of test failures in logs, thereby reducing triage time and simplifying test maintenance.
How did you do it?
I updated the assertion statements in the following test files to include descriptive error messages:
tests/gnmi/test_gnmi_countersdb.py
tests/snmp/test_snmp_lldp.py
How did you verify/test it?
Verified that the updated assertion messages are correctly reflected in the test code by reviewing the changes locally