Uh oh!
There was an error while loading. Please reload this page.
Refactoring of P2P unit tests - #30
Conversation
| } | ||
| } | ||
| func makeTestNetowork(t *testing.T, n int, conns map[int][]int, logger log.Logger) testNet { |
There was a problem hiding this comment.
Yeah, this increases the readbility of the tests 👍🏼
| funcmakeTestNetowork(t*testing.T, nint, connsmap[int][]int, logger log.Logger) testNet { | |
| funcmakeTestNetwork(t*testing.T, nint, connsmap[int][]int, logger log.Logger) testNet { |
And the calling code as well.
There was a problem hiding this comment.
There should be 🤦 reaction :D
Uh oh!
There was an error while loading. Please reload this page.
e97f4bf to
7777439Compare94e7acc to
5ba2324Comparecodecov-io
commented
Mar 23, 2021
Codecov Report
@@ Coverage Diff @@## main #30 +/- ##
==========================================
- Coverage 72.07% 71.81% -0.26%
==========================================
Files 3 3 Lines 111 110 -1 ==========================================
- Hits 80 79 -1
Misses 16 16 Partials 15 15
Continue to review full report at Codecov.
|
| t.Helper() | ||
| require := require.New(t) | ||
| mnet, err := mocknet.FullMeshLinked(context.Background(), n) |
There was a problem hiding this comment.
Better create context at the beginning of the test and pass it here. That might be helpful in some tests
Refactoring of P2P layer tests.
Resolves#26, #27.