-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Refactor FullMeshLinked and ConnectAll() #1617
Conversation
@@ -273,10 +273,12 @@ func TestNetworkSetup(t *testing.T) { | |||
|
|||
func TestStreams(t *testing.T) { | |||
|
|||
mn, err := FullMeshConnected(context.Background(), 3) | |||
mn, err := WithNPeers(context.Background(), 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dont see what we lose by continuing to use FullMeshConnected
in cases like these. Maybe just make FullMeshConnected
be:
func FullMeshConnected(...) {
mn, err := WithNPeers(context.Background(), 3)
if err != nil {
nil, err
}
mn.LinkAll()
mn.ConnectAll()
return mn, nil
}
i think this is different from @whyrusleeping's case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was thinking of doing this one instead.
2af62d2
to
ef0bf10
Compare
ef0bf10
to
34110fc
Compare
Looks like there are 2 different |
@rht i think some tests are counting on avoiding duplicates. maybe pass in a bool? or just have two functions? |
|
License: MIT Signed-off-by: rht <[email protected]>
34110fc
to
63c7741
Compare
Since |
@rht LGTM |
Refactor FullMeshLinked and ConnectAll()
No description provided.