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
dms3
go-unixfs
Commits
1eaeb3ba
Commit
1eaeb3ba
authored
10 years ago
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make tests pass a little more reliably by changing a port to not overlap
parent
ae6285e5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
routing/dht/dht_test.go
routing/dht/dht_test.go
+1
-1
swarm/swarm_test.go
swarm/swarm_test.go
+4
-4
No files found.
routing/dht/dht_test.go
View file @
1eaeb3ba
...
...
@@ -13,7 +13,7 @@ import (
func
TestPing
(
t
*
testing
.
T
)
{
u
.
Debug
=
false
addr_a
,
err
:=
ma
.
NewMultiaddr
(
"/ip4/127.0.0.1/tcp/
1234
"
)
addr_a
,
err
:=
ma
.
NewMultiaddr
(
"/ip4/127.0.0.1/tcp/
2222
"
)
if
err
!=
nil
{
t
.
Fatal
(
err
)
}
...
...
This diff is collapsed.
Click to expand it.
swarm/swarm_test.go
View file @
1eaeb3ba
...
...
@@ -43,8 +43,8 @@ func pong(c net.Conn, peer *peer.Peer) {
func
TestSwarm
(
t
*
testing
.
T
)
{
swarm
:=
NewSwarm
(
nil
)
peers
:=
[]
*
peer
.
Peer
{}
listeners
:=
[]
*
net
.
Listener
{}
var
peers
[]
*
peer
.
Peer
var
listeners
[]
net
.
Listener
peerNames
:=
map
[
string
]
string
{
"11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a30"
:
"/ip4/127.0.0.1/tcp/1234"
,
"11140beec7b5ea3f0fdbc95d0dd47f3c5bc275da8a31"
:
"/ip4/127.0.0.1/tcp/2345"
,
...
...
@@ -78,7 +78,7 @@ func TestSwarm(t *testing.T) {
// ok done, add it.
peers
=
append
(
peers
,
peer
)
listeners
=
append
(
listeners
,
&
listener
)
listeners
=
append
(
listeners
,
listener
)
}
MsgNum
:=
1000
...
...
@@ -112,6 +112,6 @@ func TestSwarm(t *testing.T) {
fmt
.
Println
(
"closing"
)
swarm
.
Close
()
for
_
,
listener
:=
range
listeners
{
(
*
listener
)
.
(
*
net
.
TCPListener
)
.
Close
()
listener
.
(
*
net
.
TCPListener
)
.
Close
()
}
}
This diff is collapsed.
Click to expand it.
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