mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 09:34:03 +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[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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user