Commit 5111cf87 authored by Steven Allen's avatar Steven Allen

test: verify that tests aren't passing because we have empty routing tables

parent e2d2246d
......@@ -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:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment