check detect time samples before accessing list by index in test_pfcw…#22250
Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom Mar 3, 2026
Merged
Conversation
…d_timer_accuracy Signed-off-by: xuliping <xuliping@microsoft.com>
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
aronovic
pushed a commit
to aronovic/sonic-mgmt
that referenced
this pull request
Mar 3, 2026
…d_timer_accuracy (sonic-net#22250) What is the motivation for this PR? The error message “IndexError: list index out of range” is unclear and potentially misleading. How did you do it? Modify the output error message, check the timestamp sample before accessing the list How did you verify/test it? run elastic test 202505 https://elastictest.org/scheduler/testplan/69841fb948d58f009f2c7154 202511 https://elastictest.org/scheduler/testplan/69842120bb7d1dad4c803d16 inject failure https://elastictest.org/scheduler/testplan/698482c1bb7d1dad4c803dc8 > pytest.fail( "Too many iterations failed to collect PFCWD timestamps. " "Detect time samples: {}/{} (failures: {}), Restore time samples: {}/{} (failures: {}). " "Required at least {} samples. This may indicate environment or timing issues.".format( detect_count, ITERATION_NUM, detect_failures, restore_count, ITERATION_NUM, restore_failures, required_samples)) E Failed: Too many iterations failed to collect PFCWD timestamps. Detect time samples: 0/20 (failures: 20) Signed-off-by: xuliping <xuliping@microsoft.com> Signed-off-by: Mihut Aronovici <aronovic@cisco.com>
rraghav-cisco
pushed a commit
to rraghav-cisco/sonic-mgmt
that referenced
this pull request
Mar 3, 2026
…d_timer_accuracy (sonic-net#22250) What is the motivation for this PR? The error message “IndexError: list index out of range” is unclear and potentially misleading. How did you do it? Modify the output error message, check the timestamp sample before accessing the list How did you verify/test it? run elastic test 202505 https://elastictest.org/scheduler/testplan/69841fb948d58f009f2c7154 202511 https://elastictest.org/scheduler/testplan/69842120bb7d1dad4c803d16 inject failure https://elastictest.org/scheduler/testplan/698482c1bb7d1dad4c803dc8 > pytest.fail( "Too many iterations failed to collect PFCWD timestamps. " "Detect time samples: {}/{} (failures: {}), Restore time samples: {}/{} (failures: {}). " "Required at least {} samples. This may indicate environment or timing issues.".format( detect_count, ITERATION_NUM, detect_failures, restore_count, ITERATION_NUM, restore_failures, required_samples)) E Failed: Too many iterations failed to collect PFCWD timestamps. Detect time samples: 0/20 (failures: 20) Signed-off-by: xuliping <xuliping@microsoft.com> Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Mar 3, 2026
…d_timer_accuracy (sonic-net#22250) What is the motivation for this PR? The error message “IndexError: list index out of range” is unclear and potentially misleading. How did you do it? Modify the output error message, check the timestamp sample before accessing the list How did you verify/test it? run elastic test 202505 https://elastictest.org/scheduler/testplan/69841fb948d58f009f2c7154 202511 https://elastictest.org/scheduler/testplan/69842120bb7d1dad4c803d16 inject failure https://elastictest.org/scheduler/testplan/698482c1bb7d1dad4c803dc8 > pytest.fail( "Too many iterations failed to collect PFCWD timestamps. " "Detect time samples: {}/{} (failures: {}), Restore time samples: {}/{} (failures: {}). " "Required at least {} samples. This may indicate environment or timing issues.".format( detect_count, ITERATION_NUM, detect_failures, restore_count, ITERATION_NUM, restore_failures, required_samples)) E Failed: Too many iterations failed to collect PFCWD timestamps. Detect time samples: 0/20 (failures: 20) Signed-off-by: xuliping <xuliping@microsoft.com> Signed-off-by: mssonicbld <sonicbld@microsoft.com>
Collaborator
|
Cherry-pick PR to 202511: #22713 |
Open
12 tasks
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.
…d_timer_accuracy
Description of PR
Summary:
Fixes # (issue)
36117223
Type of change
Back port request
Approach
What is the motivation for this PR?
The error message “IndexError: list index out of range” is unclear and potentially misleading.
How did you do it?
Modify the output error message, check the timestamp sample before accessing the list
How did you verify/test it?
run elastic test
202505
https://elastictest.org/scheduler/testplan/69841fb948d58f009f2c7154
202511
https://elastictest.org/scheduler/testplan/69842120bb7d1dad4c803d16
inject failure
https://elastictest.org/scheduler/testplan/698482c1bb7d1dad4c803dc8
Any platform specific information?
Supported testbed topology if it's a new test case?
Documentation