From 2ad23f05797195d434baa2188075b346922739d0 Mon Sep 17 00:00:00 2001 From: Juan Batiz-Benet Date: Sun, 28 Dec 2014 15:46:41 -0800 Subject: [PATCH] dht: fix TestLayeredGet The test was occasionally passing because: - it called `putLocal(key, val)` - GetValue calls `getLocal(key)` optimistically. cc @whyrusleeping --- routing/dht/dht_test.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/routing/dht/dht_test.go b/routing/dht/dht_test.go index bbc7b9692..547e88a9c 100644 --- a/routing/dht/dht_test.go +++ b/routing/dht/dht_test.go @@ -486,12 +486,7 @@ func TestLayeredGet(t *testing.T) { connect(t, ctx, dhts[1], dhts[2]) connect(t, ctx, dhts[1], dhts[3]) - err := dhts[3].putLocal(u.Key("/v/hello"), []byte("world")) - if err != nil { - t.Fatal(err) - } - - err = dhts[3].Provide(ctx, u.Key("/v/hello")) + err := dhts[3].Provide(ctx, u.Key("/v/hello")) if err != nil { t.Fatal(err) }