gossamer icon indicating copy to clipboard operation
gossamer copied to clipboard

fix(dot/network): fix data race and add `t.Parallel` to all tests

Open EclesioMeloJunior opened this issue 3 years ago • 4 comments

Changes

  • Removes all the race conditions at dot/network package

Tests

go test ./dot/network -race -v -short

On apple silicon processors

MallocNanoZone=0 go test ./dot/network -race -v -short

Issues

  • Closes #2044

Primary Reviewer

  • @timwu20

EclesioMeloJunior avatar Dec 06 '21 21:12 EclesioMeloJunior

blocked by PR #2106

EclesioMeloJunior avatar Dec 07 '21 19:12 EclesioMeloJunior

Codecov Report

Merging #2105 (dd9a674) into development (d2ee47e) will increase coverage by 2.65%. The diff coverage is 59.05%.

:exclamation: Current head dd9a674 differs from pull request most recent head f1b9a3f. Consider uploading reports for the commit f1b9a3f to get more accurate results

@@               Coverage Diff               @@
##           development    #2105      +/-   ##
===============================================
+ Coverage        57.40%   60.06%   +2.65%     
===============================================
  Files              217      214       -3     
  Lines            28587    27807     -780     
===============================================
+ Hits             16411    16701     +290     
+ Misses           10487     9381    -1106     
- Partials          1689     1725      +36     
Flag Coverage Δ
unit-tests 60.06% <59.05%> (+2.65%) :arrow_up:

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

Impacted Files Coverage Δ
dot/network/config.go 63.01% <ø> (ø)
lib/utils/test_utils.go 0.00% <0.00%> (ø)
dot/peerset/handler.go 56.88% <63.15%> (-0.73%) :arrow_down:
dot/network/service.go 55.94% <77.77%> (-1.07%) :arrow_down:
dot/peerset/peerstate.go 76.73% <85.71%> (+7.60%) :arrow_up:
dot/network/host.go 65.37% <100.00%> (+1.06%) :arrow_up:
dot/network/notifications.go 69.38% <100.00%> (+5.59%) :arrow_up:
dot/network/stream_manager.go 93.18% <100.00%> (-0.57%) :arrow_down:
dot/core/service.go 0.00% <0.00%> (-75.13%) :arrow_down:
dot/config.go 24.90% <0.00%> (-73.24%) :arrow_down:
... and 113 more

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update d2ee47e...f1b9a3f. Read the comment docs.

codecov[bot] avatar Jan 14 '22 20:01 codecov[bot]

@EclesioMeloJunior can you resolve the conflicts?

timwu20 avatar Mar 16 '22 18:03 timwu20

@EclesioMeloJunior can you resolve the conflicts?

Of course, once I finish PR #2267 which this one depends on

EclesioMeloJunior avatar Mar 16 '22 19:03 EclesioMeloJunior

@EclesioMeloJunior can you change this to draft if you don't intend to merge this.

timwu20 avatar Oct 21 '22 20:10 timwu20