Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[16.0] Fix flaky GoroutinesMonitor Go test#5469

Merged
rene merged 1 commit into
lf-edge:16.0from
OhmSpectator:backport/16.0/fix-flacky-goroutine-test
Dec 1, 2025
Merged

[16.0] Fix flaky GoroutinesMonitor Go test#5469
rene merged 1 commit into
lf-edge:16.0from
OhmSpectator:backport/16.0/fix-flacky-goroutine-test

Conversation

@OhmSpectator

Copy link
Copy Markdown
Member

Description

Backport of #5467

PR dependencies

None.

How to test and validate this PR

No external manual test is required.

Changelog notes

No user-facing changes.

Checklist

  • I've provided a proper description
  • I've added the proper documentation
  • I've tested my PR on amd64 device
  • I've tested my PR on arm64 device
  • I've written the test verification instructions
  • I've set the proper labels to this PR
  • I've added a reference link to the original PR
  • PR's title follows the template
  • I've checked the boxes above, or I've provided a good reason why I didn't
    check them.

…ecrease

The test was failing due to a race condition when checking the exact
number of entries removed from the stats slice during dynamic resizing.
The test expected exactly 720 entries to be removed when halving the
slice size, but due to timing variations in the asynchronous monitor,
the actual number could differ.

The fix removes the exact count assertion and instead verifies that
resizing occurred with the correct new size and that some entries were
removed. This maintains test coverage while eliminating the flakiness.

Signed-off-by: Nikolay Martyanov <[email protected]>
(cherry picked from commit 4573c50)

@eriknordmark eriknordmark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@rene rene merged commit 234d40e into lf-edge:16.0 Dec 1, 2025
44 of 45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants