Commit b3a6834b authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

respect don contexteone

parent e5502938
......@@ -31,7 +31,7 @@ func (dht *IpfsDHT) handleNewMessage(s inet.Stream) {
// receive msg
pmes := new(pb.Message)
if err := r.ReadMsg(pmes); err != nil {
log.Error("Error unmarshaling data")
log.Errorf("Error unmarshaling data: %s", err)
return
}
......
......@@ -265,7 +265,8 @@ func TestBootstrap(t *testing.T) {
}
t.Logf("bootstrapping them so they find each other", nDHTs)
bootstrap(t, ctx, dhts)
ctxT, _ := context.WithTimeout(ctx, 5*time.Second)
bootstrap(t, ctxT, dhts)
// the routing tables should be full now. let's inspect them.
t.Logf("checking routing table of %d", nDHTs)
......
......@@ -73,7 +73,7 @@ func TestGetFailures(t *testing.T) {
})
// This one should fail with NotFound
ctx2, _ := context.WithTimeout(context.Background(), time.Second)
ctx2, _ := context.WithTimeout(context.Background(), 3*time.Second)
_, err = d.GetValue(ctx2, u.Key("test"))
if err != nil {
if err != routing.ErrNotFound {
......
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