@cryptotaxi247 / kubo / commits / 2ad23f057

dht: fix TestLayeredGet

The test was occasionally passing because: - it called `putLocal(key, val)` - GetValue calls `getLocal(key)` optimistically. cc @whyrusleeping

Juan Batiz-Benet committed Dec 28, 2014 at 15:46 UTC 2ad23f05797195d434baa2188075b346922739d0
1 file changed +1 -6
routing/dht/dht_test.go
+1 -6
@@ -486,12 +486,7 @@ func TestLayeredGet(t *testing.T) {
486 connect(t, ctx, dhts[1], dhts[2])
487 connect(t, ctx, dhts[1], dhts[3])
488
489 - err := dhts[3].putLocal(u.Key("/v/hello"), []byte("world"))
490 - if err != nil {
491 - t.Fatal(err)
492 - }
493 -
494 - err = dhts[3].Provide(ctx, u.Key("/v/hello"))
489 + err := dhts[3].Provide(ctx, u.Key("/v/hello"))
490 if err != nil {
491 t.Fatal(err)
492 }