Skip to content

refactor: refactor bfd static route tests#13063

Merged
abdosi merged 2 commits intosonic-net:masterfrom
cyw233:refactor-bfd-tests
Jun 7, 2024
Merged

refactor: refactor bfd static route tests#13063
abdosi merged 2 commits intosonic-net:masterfrom
cyw233:refactor-bfd-tests

Conversation

@cyw233
Copy link
Copy Markdown
Contributor

@cyw233 cyw233 commented May 30, 2024

Description of PR

This is a follow-up PR for #12995. This PR includes more code refactoring on bfd/test_bfd_static_route.py, such as parametrizing IPv4 and IPv6 for each test, moving static methods out of BfdBase class, removing unnecessary fixtures and etc.

Summary:
Fixes # (issue) Microsoft ADO 27749982

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205
  • 202305
  • 202311

Approach

What is the motivation for this PR?

To refactor the test cases in bfd/test_bfd_static_route.py to make it more readable and efficient

How did you do it?

How did you verify/test it?

I have run all test cases in this file in a T2 chassis device and can confirm they all passed.

Any platform specific information?

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

Documentation

@cyw233
Copy link
Copy Markdown
Contributor Author

cyw233 commented May 30, 2024

/azp run Azure.sonic-mgmt

@azure-pipelines
Copy link
Copy Markdown

Commenter does not have sufficient privileges for PR 13063 in repo sonic-net/sonic-mgmt

@cyw233 cyw233 force-pushed the refactor-bfd-tests branch from e3de118 to 302bf51 Compare May 31, 2024 00:34
@wsycqyz
Copy link
Copy Markdown
Contributor

wsycqyz commented May 31, 2024

This seems to be a huge change. Do you have chance to test on chassis testbed?

@cyw233
Copy link
Copy Markdown
Contributor Author

cyw233 commented May 31, 2024

This seems to be a huge change. Do you have chance to test on chassis testbed?

Yes, I tested all test cases on a chassis testbed and can confirm they have passed

Copy link
Copy Markdown
Contributor

@wsycqyz wsycqyz left a comment

Choose a reason for hiding this comment

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

LGTM

@cyw233 cyw233 requested a review from abdosi May 31, 2024 01:18
@@ -20,7 +22,7 @@ class TestBfdStaticRoute(BfdBase):
TOTAL_ITERATIONS = 100
Copy link
Copy Markdown
Contributor Author

@cyw233 cyw233 Jun 5, 2024

Choose a reason for hiding this comment

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

Currently we have 100 iterations for BFD flap test, which will take a long time (~4h) to complete. I will make the iteration number to be based on the completeness level in my next PR (Microsoft ADO 28301940)

@abdosi abdosi merged commit 2665f25 into sonic-net:master Jun 7, 2024
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jun 7, 2024
This is a follow-up PR for sonic-net#12995. This PR includes more code refactoring on bfd/test_bfd_static_route.py, such as parametrizing IPv4 and IPv6 for each test, moving static methods out of BfdBase class, removing unnecessary fixtures and etc.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202405: #13183

mssonicbld pushed a commit that referenced this pull request Jun 7, 2024
This is a follow-up PR for #12995. This PR includes more code refactoring on bfd/test_bfd_static_route.py, such as parametrizing IPv4 and IPv6 for each test, moving static methods out of BfdBase class, removing unnecessary fixtures and etc.
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.

5 participants