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

[dualtor] Fix snmp/* tests failure on fixture teardown #15529

Merged

Conversation

vkjammala-arista
Copy link
Contributor

@vkjammala-arista vkjammala-arista commented Nov 13, 2024

Description of PR

Summary: Move yield statement out of for loop in snmp fixture setup_check_snmp_ready
Fixes # https://github.com/aristanetworks/sonic-qual.msft/issues/307

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?

#15359 has introduced a "yield" statement inside the for loop of duthosts which is causing fixture teardown to fail with Failed: fixture function has more than one 'yield' message.

How did you do it?

Move "yield" statement out of this for loop of duthosts and do config rollback in a seperate for loop of duthosts.

How did you verify/test it?

Ran tests under snmp folder and tests are passing on Arista-7260CX3-D108C8 platform.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

PR#15359 has introduced a "yield" statement inside the for loop of
duthosts which is causing fixture teardown to fail with "Failed: fixture
function has more than one 'yield'" message. Fix is to move "yield"
statement out of this for loop and do config rollback in a seperate for
loop of duthosts.
Copy link
Contributor

@vperumal vperumal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@agadia-cisco
Copy link
Contributor

LGTM

Copy link
Contributor

@lolyu lolyu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@StormLiangMS
Copy link
Collaborator

/azp run Azure.sonic-mgmt

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StormLiangMS StormLiangMS merged commit 5d985b9 into sonic-net:master Nov 15, 2024
15 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Nov 15, 2024
Approach
What is the motivation for this PR?
sonic-net#15359 has introduced a "yield" statement inside the for loop of duthosts which is causing fixture teardown to fail with Failed: fixture function has more than one 'yield' message.

How did you do it?
Move "yield" statement out of this for loop of duthosts and do config rollback in a seperate for loop of duthosts.

How did you verify/test it?
Ran tests under snmp folder and tests are passing on Arista-7260CX3-D108C8 platform.

Any platform specific information?
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202405: #15575

mssonicbld pushed a commit that referenced this pull request Nov 15, 2024
Approach
What is the motivation for this PR?
#15359 has introduced a "yield" statement inside the for loop of duthosts which is causing fixture teardown to fail with Failed: fixture function has more than one 'yield' message.

How did you do it?
Move "yield" statement out of this for loop of duthosts and do config rollback in a seperate for loop of duthosts.

How did you verify/test it?
Ran tests under snmp folder and tests are passing on Arista-7260CX3-D108C8 platform.

Any platform specific information?
sreejithsreekumaran pushed a commit to sreejithsreekumaran/sonic-mgmt that referenced this pull request Nov 15, 2024
Approach
What is the motivation for this PR?
sonic-net#15359 has introduced a "yield" statement inside the for loop of duthosts which is causing fixture teardown to fail with Failed: fixture function has more than one 'yield' message.

How did you do it?
Move "yield" statement out of this for loop of duthosts and do config rollback in a seperate for loop of duthosts.

How did you verify/test it?
Ran tests under snmp folder and tests are passing on Arista-7260CX3-D108C8 platform.

Any platform specific information?
yutongzhang-microsoft pushed a commit to yutongzhang-microsoft/sonic-mgmt that referenced this pull request Nov 21, 2024
Approach
What is the motivation for this PR?
sonic-net#15359 has introduced a "yield" statement inside the for loop of duthosts which is causing fixture teardown to fail with Failed: fixture function has more than one 'yield' message.

How did you do it?
Move "yield" statement out of this for loop of duthosts and do config rollback in a seperate for loop of duthosts.

How did you verify/test it?
Ran tests under snmp folder and tests are passing on Arista-7260CX3-D108C8 platform.

Any platform specific information?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants