Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-swarm
Commits
f31d6fbf
Commit
f31d6fbf
authored
Jun 11, 2018
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't hang tests on dial failure
parent
d921f5c9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
simul_test.go
simul_test.go
+2
-2
No files found.
simul_test.go
View file @
f31d6fbf
...
...
@@ -27,13 +27,13 @@ func TestSimultOpen(t *testing.T) {
{
var
wg
sync
.
WaitGroup
connect
:=
func
(
s
*
Swarm
,
dst
peer
.
ID
,
addr
ma
.
Multiaddr
)
{
defer
wg
.
Done
()
// copy for other peer
log
.
Debugf
(
"TestSimultOpen: connecting: %s --> %s (%s)"
,
s
.
LocalPeer
(),
dst
,
addr
)
s
.
Peerstore
()
.
AddAddr
(
dst
,
addr
,
pstore
.
PermanentAddrTTL
)
if
_
,
err
:=
s
.
DialPeer
(
ctx
,
dst
);
err
!=
nil
{
t
.
Fatal
(
"error swarm dialing to peer"
,
err
)
t
.
Error
(
"error swarm dialing to peer"
,
err
)
}
wg
.
Done
()
}
log
.
Info
(
"Connecting swarms simultaneously."
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment