Added detailed reason for assert failure for bgp#19587
Merged
StormLiangMS merged 2 commits intosonic-net:masterfrom Jul 30, 2025
Merged
Added detailed reason for assert failure for bgp#19587StormLiangMS merged 2 commits intosonic-net:masterfrom
StormLiangMS merged 2 commits 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). |
Contributor
Author
ZhaohuiS
reviewed
Jul 21, 2025
tests/bgp/test_bgp_speaker.py
Outdated
| "BGP neighbors items: {} " | ||
| ).format( | ||
| (v["state"] for _, v in list(bgp_facts["bgp_neighbors"].items())), | ||
| bgp_facts["bgp_neighbors"], |
Contributor
There was a problem hiding this comment.
Please remove bgp_facts["bgp_neighbors"], which is a long dictionary
ZhaohuiS
reviewed
Jul 21, 2025
tests/bgp/test_bgp_speaker.py
Outdated
| "No BGP session with PTF. " | ||
| "Speaker IP: {} " | ||
| "BGP neighbors: {} " | ||
| ).format(str(speaker_ips[2].ip), bgp_facts["bgp_neighbors"]) |
Contributor
There was a problem hiding this comment.
Please remove bgp_facts["bgp_neighbors"], which is a long dictionary
ZhaohuiS
reviewed
Jul 21, 2025
tests/bgp/test_bgp_speaker.py
Outdated
| "DUT Host: {}" | ||
| "Speaker IPs: {}" | ||
| "Neighbor learning status: {}" | ||
| ).format(duthost, speaker_ips, is_all_neighbors_learned(duthost, speaker_ips)) |
Contributor
There was a problem hiding this comment.
Remove is_all_neighbors_learned(duthost, speaker_ips),
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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: #19945 |
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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 <110003254+opcoder0@users.noreply.github.com>
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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 <gshemesh@nvidia.com>
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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 <amalkin@nvidia.com>
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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 <gshemesh@nvidia.com>
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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 <gshemesh@nvidia.com>
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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 <ytzur@nvidia.com>
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/bgp/test_bgp_speaker.py tests/bgp/test_bgp_router_id.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/bgp/test_bgp_speaker.py
tests/bgp/test_bgp_router_id.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.