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-kad-dht
Commits
5111cf87
Commit
5111cf87
authored
May 05, 2020
by
Steven Allen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test: verify that tests aren't passing because we have empty routing tables
parent
e2d2246d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
ext_test.go
ext_test.go
+13
-0
No files found.
ext_test.go
View file @
5111cf87
...
...
@@ -75,6 +75,10 @@ func TestHungRequest(t *testing.T) {
}
}
if
d
.
routingTable
.
Size
()
==
0
{
// make sure we didn't just disconnect
t
.
Fatal
(
"expected peers in the routing table"
)
}
}
func
TestGetFailures
(
t
*
testing
.
T
)
{
...
...
@@ -202,6 +206,11 @@ func TestGetFailures(t *testing.T) {
t
.
Fatal
(
"shouldnt have provider peers"
)
}
}
if
d
.
routingTable
.
Size
()
==
0
{
// make sure we didn't just disconnect
t
.
Fatal
(
"expected peers in the routing table"
)
}
}
func
TestNotFound
(
t
*
testing
.
T
)
{
...
...
@@ -275,6 +284,10 @@ func TestNotFound(t *testing.T) {
}
switch
err
{
case
routing
.
ErrNotFound
:
if
d
.
routingTable
.
Size
()
==
0
{
// make sure we didn't just disconnect
t
.
Fatal
(
"expected peers in the routing table"
)
}
//Success!
return
case
u
.
ErrTimeout
:
...
...
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