Skip to content

Make test_neighbor_mac_noptf more robust#9422

Merged
wenyiz2021 merged 2 commits intosonic-net:masterfrom
ysmanman:fix-arp-test
Aug 18, 2023
Merged

Make test_neighbor_mac_noptf more robust#9422
wenyiz2021 merged 2 commits intosonic-net:masterfrom
ysmanman:fix-arp-test

Conversation

@ysmanman
Copy link
Copy Markdown
Contributor

Description of PR

test_neighbor_mac_noptf is flaky because sometimes it may take longer than usual to update intf address, add neighbor, and also change neighbor MAC. Make the test more robust by retrying the validation of neighbor in redis DB.

Summary:
Fixes # #9032

Type of change

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

Back port request

  • 201911
  • 202012
  • [ x] 202205

Approach

What is the motivation for this PR?

How did you do it?

How did you verify/test it?

Any platform specific information?

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

Documentation

… than usual to

update intf address, add neighbor, and also change neighbor MAC. Make the test more
robust by retrying the validation of neighbor in redis DB.
@mssonicbld
Copy link
Copy Markdown
Collaborator

The pre-commit check detected issues in the files touched by this pull request.
The pre-commit check is a mandatory check, please fix detected issues.

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/arp/test_neighbor_mac_noptf.py:293:121: E501 line too long (126 > 120 characters)
tests/arp/test_neighbor_mac_noptf.py:297:121: E501 line too long (124 > 120 characters)
tests/arp/test_neighbor_mac_noptf.py:300:24: E201 whitespace after '('
tests/arp/test_neighbor_mac_noptf.py:300:26: E202 whitespace before ')'

flake8...............................................(no files to check)Skipped
check conditional mark sort..........................(no files to check)Skipped

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>

@ysmanman
Copy link
Copy Markdown
Contributor Author

Add @wenyiz2021 @arlakshm @kenneth-arista for visibility.

Copy link
Copy Markdown
Contributor

@wenyiz2021 wenyiz2021 left a comment

Choose a reason for hiding this comment

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

LGTM

@wenyiz2021 wenyiz2021 merged commit 4f7be5c into sonic-net:master Aug 18, 2023
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Aug 29, 2023
* test_neighbor_mac_noptf is flaky because sometimes it may take longer than usual to
update intf address, add neighbor, and also change neighbor MAC. Make the test more
robust by retrying the validation of neighbor in redis DB.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202305: #9731

mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Aug 29, 2023
* test_neighbor_mac_noptf is flaky because sometimes it may take longer than usual to
update intf address, add neighbor, and also change neighbor MAC. Make the test more
robust by retrying the validation of neighbor in redis DB.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202205: #9732

mssonicbld pushed a commit that referenced this pull request Aug 29, 2023
* test_neighbor_mac_noptf is flaky because sometimes it may take longer than usual to
update intf address, add neighbor, and also change neighbor MAC. Make the test more
robust by retrying the validation of neighbor in redis DB.
mssonicbld pushed a commit that referenced this pull request Aug 29, 2023
* test_neighbor_mac_noptf is flaky because sometimes it may take longer than usual to
update intf address, add neighbor, and also change neighbor MAC. Make the test more
robust by retrying the validation of neighbor in redis DB.
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Jan 25, 2024
* test_neighbor_mac_noptf is flaky because sometimes it may take longer than usual to
update intf address, add neighbor, and also change neighbor MAC. Make the test more
robust by retrying the validation of neighbor in redis DB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants