mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 17:36:38 +08:00
dht: fix TestLayeredGet
The test was occasionally passing because: - it called `putLocal(key, val)` - GetValue calls `getLocal(key)` optimistically. cc @whyrusleeping
This commit is contained in:
@ -486,12 +486,7 @@ func TestLayeredGet(t *testing.T) {
|
|||||||
connect(t, ctx, dhts[1], dhts[2])
|
connect(t, ctx, dhts[1], dhts[2])
|
||||||
connect(t, ctx, dhts[1], dhts[3])
|
connect(t, ctx, dhts[1], dhts[3])
|
||||||
|
|
||||||
err := dhts[3].putLocal(u.Key("/v/hello"), []byte("world"))
|
err := dhts[3].Provide(ctx, u.Key("/v/hello"))
|
||||||
if err != nil {
|
|
||||||
t.Fatal(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
err = dhts[3].Provide(ctx, u.Key("/v/hello"))
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user