mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-29 01:12:24 +08:00
test: fix race in namesys tests
Resolves #4018 License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protonmail.ch>
This commit is contained in:
@ -12,6 +12,7 @@ import (
|
||||
|
||||
ci "gx/ipfs/QmP1DfoUjiWH2ZBo1PBH6FupdBucbDepx3HpWmEY6JMUpY/go-libp2p-crypto"
|
||||
ds "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore"
|
||||
dssync "gx/ipfs/QmVSase1JP7cq9QkPT46oNwdp9pT6kBkG3oqS14y3QcZjG/go-datastore/sync"
|
||||
)
|
||||
|
||||
type mockResolver struct {
|
||||
@ -76,7 +77,7 @@ func TestNamesysResolution(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPublishWithCache0(t *testing.T) {
|
||||
dst := ds.NewMapDatastore()
|
||||
dst := dssync.MutexWrap(ds.NewMapDatastore())
|
||||
priv, _, err := ci.GenerateKeyPair(ci.RSA, 1024)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
Reference in New Issue
Block a user