Skip to content

Commit

Permalink
test(coreapi): use a thread-safe datastore everywhere
Browse files Browse the repository at this point in the history
fixes libp2p/go-libp2p-kad-dht#321

License: MIT
Signed-off-by: Steven Allen <steven@stebalien.com>
  • Loading branch information
Stebalien committed Apr 16, 2019
1 parent 1ecc2d6 commit 4f4e03b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/coreapi/test/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,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())),
}
Expand Down

0 comments on commit 4f4e03b

Please sign in to comment.