Skip to content

bgp/test_prefix_list_suppress.py add wait_until for syslog - #27839

Open
arista-nwolfe wants to merge 1 commit into
sonic-net:masterfrom
arista-nwolfe:master-test_prefix_list_suppress-wait_until
Open

bgp/test_prefix_list_suppress.py add wait_until for syslog#27839
arista-nwolfe wants to merge 1 commit into
sonic-net:masterfrom
arista-nwolfe:master-test_prefix_list_suppress-wait_until

Conversation

@arista-nwolfe

Copy link
Copy Markdown
Contributor

#27837

Description of PR

The test bgp/test_prefix_list_suppress.py::TestAnchorPrefixRegression::test_prefix_list_mgr_running_on_every_device expects bgpcfgd to emit syslog 'AsPath Manager is enabled for'
But sometimes the assertion is seen before the syslog shows up (see #27837)
Add a wait_until to give bgpcfgd a chance to emit the syslog

Summary:
Fixes #27837

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605

Tested branch

  • master
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511
  • 202512
  • 202605
  • N/A

Test result

  • 202605: Ran with latest built 202605 and stressed test 20 times, all pass

Approach

What is the motivation for this PR?

If bgpcfgd is slower to emit the syslog we shouldn't cause the test to fail

How did you do it?

Convert syslog read and assert into a wait_until

How did you verify/test it?

Ran the bgp/test_prefix_list_suppress.py::TestAnchorPrefixRegression::test_prefix_list_mgr_running_on_every_device against a UT2 20 times without failure

Any platform specific information?

N/A

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

N/A

Documentation

N/A

The test expects bgpcfgd to emit syslog
'AsPath Manager is enabled for'
But sometimes the assertion is seen before the syslog shows up
Add a wait_until to give bgpcfgd a chance to emit the syslog

sonic-net#27837

Signed-off-by: Nathan Wolfe <nwolfe@arista.com>
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

This PR has backport request for branch(es): 202605.
Added label(s) for branch(es) 202605.

---Powered by SONiC BuildBot

@mssonicbld mssonicbld added the Tested for 202605 branch Tested for 202605 branch label Sep 10, 2026
@mssonicbld

Copy link
Copy Markdown
Collaborator

The Tested branch section has been ticked and Test result is provided for branch(es): 202605. Added label(s): Tested for 202605 Branch.

---Powered by SONiC BuildBot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Bug: bgp/test_prefix_list_suppress.py fails expecting syslog AsPath Manager is enabled for

2 participants