Skip to content

Commit 5111cf8

Browse files
committed
test: verify that tests aren't passing because we have empty routing tables
1 parent e2d2246 commit 5111cf8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

ext_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ func TestHungRequest(t *testing.T) {
7575
}
7676
}
7777

78+
if d.routingTable.Size() == 0 {
79+
// make sure we didn't just disconnect
80+
t.Fatal("expected peers in the routing table")
81+
}
7882
}
7983

8084
func TestGetFailures(t *testing.T) {
@@ -202,6 +206,11 @@ func TestGetFailures(t *testing.T) {
202206
t.Fatal("shouldnt have provider peers")
203207
}
204208
}
209+
210+
if d.routingTable.Size() == 0 {
211+
// make sure we didn't just disconnect
212+
t.Fatal("expected peers in the routing table")
213+
}
205214
}
206215

207216
func TestNotFound(t *testing.T) {
@@ -275,6 +284,10 @@ func TestNotFound(t *testing.T) {
275284
}
276285
switch err {
277286
case routing.ErrNotFound:
287+
if d.routingTable.Size() == 0 {
288+
// make sure we didn't just disconnect
289+
t.Fatal("expected peers in the routing table")
290+
}
278291
//Success!
279292
return
280293
case u.ErrTimeout:

0 commit comments

Comments
 (0)