mirror of
https://github.com/ipfs/kubo.git
synced 2025-06-30 09:59:13 +08:00
Merge pull request #4037 from ipfs/fix/namesys/test-race
test: fix race in namesys tests
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