Skip to content

everflow test case fix#6561

Merged
StormLiangMS merged 1 commit intosonic-net:masterfrom
StormLiangMS:fix_fixture_everflow
Oct 19, 2022
Merged

everflow test case fix#6561
StormLiangMS merged 1 commit intosonic-net:masterfrom
StormLiangMS:fix_fixture_everflow

Conversation

@StormLiangMS
Copy link
Collaborator

Description of PR

Summary:
This PR #6225 introduced one issue for T0/T1. The pytest will be crashed when running everflow test.

The reason is because the implementation of one fixture, setup_recycle_port, which include the yield but not run into the yield for non t2 case, which will hit one known issue of pytest, which is fixed in newer version of pytest but not in what we are using now.
pytest-dev/pytest#7061

Fixes # (issue)

Type of change

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

Back port request

  • 201911
  • 202012
  • 202205

Approach

What is the motivation for this PR?

This PR #6225 introduced one issue for T0/T1. The pytest will be crashed when running everflow test.

The reason is because the implementation of one fixture, setup_recycle_port, which include the yield but not run into the yield for non t2 case, which will hit one known issue of pytest, which is fixed in newer version of pytest but not in what we are using now.
pytest-dev/pytest#7061

How did you do it?

Change the condition to make sure the yield would be executed

How did you verify/test it?

Run everflow test.

Any platform specific information?

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

Documentation

@azure-pipelines
Copy link

The pre-commit check detected issues in the files touched by this pull request.
The detected issues may be old or new. For new issues, please try to fix them.

For old issues, it is not mandatory to fix them because they were not caused by this change. It is unfair to blame
author of this pull request. But if you can take extra effort to fix the old issues as well, that would be great!

Detailed pre-commit check results:
trim trailing whitespace.................................................Passed
fix end of files.........................................................Passed
check yaml...........................................(no files to check)Skipped
check for added large files..............................................Passed
check python ast.........................................................Passed
flake8...................................................................Failed
- hook id: flake8
- exit code: 1

tests/everflow/conftest.py:13:121: E501 line too long (121 > 120 characters)
tests/everflow/conftest.py:21:121: E501 line too long (121 > 120 characters)
tests/everflow/conftest.py:22:101: E128 continuation line under-indented for visual indent
tests/everflow/conftest.py:23:101: E128 continuation line under-indented for visual indent
tests/everflow/conftest.py:23:121: E501 line too long (121 > 120 characters)

To run the pre-commit checks locally, you can follow below steps:

  1. Ensure that default python is python3. In sonic-mgmt docker container, default python is python2. You can run
    the check by activating the python3 virtual environment in sonic-mgmt docker container or outside of sonic-mgmt
    docker container.
  2. Ensure that the pre-commit package is installed:
sudo pip install pre-commit
  1. Go to repository root folder
  2. Install the pre-commit hooks:
pre-commit install
  1. Use pre-commit to check staged file:
pre-commit
  1. Alternatively, you can check committed files using:
pre-commit run --from-ref <commit_id> --to-ref <commit_id>

@StormLiangMS StormLiangMS merged commit b497aa0 into sonic-net:master Oct 19, 2022
wangxin pushed a commit that referenced this pull request Oct 21, 2022
What is the motivation for this PR?
This PR #6225 introduced one issue for T0/T1. The pytest will be crashed when running everflow test.

The reason is because the implementation of one fixture, setup_recycle_port, which include the yield but not run into the yield for non t2 case, which will hit one known issue of pytest, which is fixed in newer version of pytest but not in what we are using now.
pytest-dev/pytest#7061

How did you do it?
Change the condition to make sure the yield would be executed

How did you verify/test it?
Run everflow test.

Any platform specific information?
Supported testbed topology if it's a new test case?
StormLiangMS added a commit that referenced this pull request Oct 26, 2022
StormLiangMS added a commit to StormLiangMS/sonic-mgmt that referenced this pull request Oct 26, 2022
@StormLiangMS StormLiangMS mentioned this pull request Oct 26, 2022
6 tasks
yxieca pushed a commit that referenced this pull request Oct 26, 2022
* Revert "[everflow] address testbed setup type checking issue (#6609)"

This reverts commit b55fe7f.

* Revert "everflow test case fix (#6561)"

This reverts commit b497aa0.

* Revert "Everflow T2 topo support and ipv6 egress tests (#6225)"

This reverts commit c3f0980.
yxieca pushed a commit that referenced this pull request Oct 26, 2022
* Revert "[everflow] address testbed setup type checking issue (#6609)"

This reverts commit b55fe7f.

* Revert "everflow test case fix (#6561)"

This reverts commit b497aa0.

* Revert "Everflow T2 topo support and ipv6 egress tests (#6225)"

This reverts commit c3f0980.
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
What is the motivation for this PR?
This PR sonic-net#6225 introduced one issue for T0/T1. The pytest will be crashed when running everflow test.

The reason is because the implementation of one fixture, setup_recycle_port, which include the yield but not run into the yield for non t2 case, which will hit one known issue of pytest, which is fixed in newer version of pytest but not in what we are using now.
pytest-dev/pytest#7061

How did you do it?
Change the condition to make sure the yield would be executed

How did you verify/test it?
Run everflow test.

Any platform specific information?
Supported testbed topology if it's a new test case?
allen-xf pushed a commit to allen-xf/sonic-mgmt that referenced this pull request Oct 28, 2022
* Revert "[everflow] address testbed setup type checking issue (sonic-net#6609)"

This reverts commit b55fe7f.

* Revert "everflow test case fix (sonic-net#6561)"

This reverts commit b497aa0.

* Revert "Everflow T2 topo support and ipv6 egress tests (sonic-net#6225)"

This reverts commit c3f0980.
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.

3 participants