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

tests: fix network metrics race condition in tests #4529

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

algorandskiy
Copy link
Contributor

Summary

There was a race condition between TagCounter.Add and TagCounter.WriteMetric when accessing the counter.

Test Plan

The issue discovered by a new test, no new tests needed.

@codecov
Copy link

codecov bot commented Sep 11, 2022

Codecov Report

Merging #4529 (5c064c0) into master (22b6101) will decrease coverage by 0.05%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master    #4529      +/-   ##
==========================================
- Coverage   54.06%   54.01%   -0.06%     
==========================================
  Files         401      401              
  Lines       51540    51542       +2     
==========================================
- Hits        27863    27838      -25     
- Misses      21346    21368      +22     
- Partials     2331     2336       +5     
Impacted Files Coverage Δ
util/metrics/tagcounter.go 81.48% <50.00%> (-0.80%) ⬇️
ledger/roundlru.go 90.56% <0.00%> (-5.67%) ⬇️
util/db/dbutil.go 44.24% <0.00%> (-4.25%) ⬇️
ledger/blockqueue.go 85.63% <0.00%> (-2.88%) ⬇️
network/wsPeer.go 66.03% <0.00%> (-2.16%) ⬇️
catchup/peerSelector.go 98.95% <0.00%> (-1.05%) ⬇️
ledger/acctupdates.go 69.59% <0.00%> (-0.60%) ⬇️
catchup/service.go 69.38% <0.00%> (+0.74%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

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.

2 participants