Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix flaky test_monitor #4537

Merged
merged 4 commits into from
Dec 6, 2023
Merged

Fix flaky test_monitor #4537

merged 4 commits into from
Dec 6, 2023

Conversation

pingsutw
Copy link
Member

@pingsutw pingsutw commented Dec 6, 2023

Why are the changes needed?

Test_monitor sometimes fails due to this error.

This error occurs because we try to call wg.Done after WaitGroup counter become 0.

What changes were proposed in this pull request?

This PR fixes this flaky test by stopping syncing item in the autoRefreshCache once WaitGroup counter become 0.

How was this patch tested?

Run this unit test

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Signed-off-by: Kevin Su <[email protected]>
Signed-off-by: Kevin Su <[email protected]>
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label Dec 6, 2023
Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (2553153) 58.91% compared to head (18ca039) 58.91%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4537   +/-   ##
=======================================
  Coverage   58.91%   58.91%           
=======================================
  Files         620      620           
  Lines       52432    52432           
=======================================
+ Hits        30889    30892    +3     
+ Misses      19078    19074    -4     
- Partials     2465     2466    +1     
Flag Coverage Δ
unittests 58.91% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@eapolinario eapolinario enabled auto-merge (squash) December 6, 2023 23:43
@eapolinario eapolinario merged commit b9907f4 into master Dec 6, 2023
40 of 41 checks passed
@eapolinario eapolinario deleted the fix-test-monitor branch December 6, 2023 23:52
pvditt pushed a commit that referenced this pull request Dec 13, 2023
* Fix flaky test_monitor

Signed-off-by: Kevin Su <[email protected]>

* fix test

Signed-off-by: Kevin Su <[email protected]>

---------

Signed-off-by: Kevin Su <[email protected]>
Co-authored-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Paul Dittamo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size:XS This PR changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants