Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3-routing
Commits
ab366112
Commit
ab366112
authored
Feb 11, 2016
by
Jeromy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix race conditions in tests
License: MIT Signed-off-by:
Jeromy
<
jeromyj@gmail.com
>
parent
b2c9738c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
mock/centralized_server.go
mock/centralized_server.go
+2
-1
No files found.
mock/centralized_server.go
View file @
ab366112
...
...
@@ -6,6 +6,7 @@ import (
"time"
ds
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore"
dssync
"github.com/ipfs/go-ipfs/Godeps/_workspace/src/github.com/ipfs/go-datastore/sync"
key
"github.com/ipfs/go-ipfs/blocks/key"
"github.com/ipfs/go-ipfs/util/testutil"
peer
"gx/ipfs/QmUBogf4nUefBjmYjn6jfsfPJRkmDGSeMhNj4usRKq69f4/go-libp2p/p2p/peer"
...
...
@@ -74,7 +75,7 @@ func (rs *s) Providers(k key.Key) []peer.PeerInfo {
}
func
(
rs
*
s
)
Client
(
p
testutil
.
Identity
)
Client
{
return
rs
.
ClientWithDatastore
(
context
.
Background
(),
p
,
ds
.
NewMapDatastore
())
return
rs
.
ClientWithDatastore
(
context
.
Background
(),
p
,
dssync
.
MutexWrap
(
ds
.
NewMapDatastore
())
)
}
func
(
rs
*
s
)
ClientWithDatastore
(
_
context
.
Context
,
p
testutil
.
Identity
,
datastore
ds
.
Datastore
)
Client
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment