Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[action] [PR:14860] fix for test_snmp_numpsu failure #15254

Merged
merged 1 commit into from
Oct 30, 2024

Conversation

mssonicbld
Copy link
Collaborator

Description of PR

Summary: test_snmp_numpsu TC fails because of change in stdout output, observed in 202405 & 202311.

Fixes # (issue)
stdout_lines will be use to fetch the numpsus value, if the stdout_lines is empty / the value can't be typecasted; then in all scenarios TC wouldn't break, instead it will Error out gracefully. Sample stdout_lines considered -

1. ["PSU0: Topology teardown completed successfully upon PSU removal", "2"]
2. ["2"]
3. []

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • Test case(new/improvement)

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405

Approach

What is the motivation for this PR?

Observed test_snmp_psu failing in 202405 & 202311 images due to change in the stdout structure.

How did you do it?

Earlier stdout output was simply getting typecasted, instead now it will use stdout_lines & check its length, if it has a non-zero length, then it will pick the last element & try typecasting it; numpsus count if exists, will always be the last element in the output.

How did you verify/test it?

Run changes with 202405 & 202311 images on a T0 setup and all of them passed.

* fix for test_snmp_numpsu tc failure

* Trigger Pipeline again
@mssonicbld
Copy link
Collaborator Author

Original PR: #14860

@mssonicbld mssonicbld merged commit 152ac7f into sonic-net:202405 Oct 30, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants