From f8c8f383db32a9d1ea13d4300b009b1de7a02915 Mon Sep 17 00:00:00 2001 From: Steven Allen Date: Mon, 15 Apr 2019 17:21:31 -0700 Subject: [PATCH] test(coreapi): use a thread-safe datastore everywhere fixes https://github.com/libp2p/go-libp2p-kad-dht/issues/321 License: MIT Signed-off-by: Steven Allen --- core/coreapi/test/api_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/coreapi/test/api_test.go b/core/coreapi/test/api_test.go index 23b8b6289..399722a83 100644 --- a/core/coreapi/test/api_test.go +++ b/core/coreapi/test/api_test.go @@ -71,10 +71,10 @@ func (NodeProvider) MakeAPISwarm(ctx context.Context, fullIdentity bool, n int) c.Identity = ident c.Experimental.FilestoreEnabled = true - ds := datastore.NewMapDatastore() + ds := syncds.MutexWrap(datastore.NewMapDatastore()) r := &repo.Mock{ C: c, - D: syncds.MutexWrap(ds), + D: ds, K: keystore.NewMemKeystore(), F: filestore.NewFileManager(ds, filepath.Dir(os.TempDir())), }