Commit bd20a39b authored by Juan Batiz-Benet's avatar Juan Batiz-Benet Committed by Jeromy

renamed {R,}Lock -> {Pin,GC}Lock

License: MIT
Signed-off-by: default avatarJuan Batiz-Benet <juan@benet.ai>
parent 10935680
...@@ -300,15 +300,13 @@ func TestCantGet(t *testing.T) { ...@@ -300,15 +300,13 @@ func TestCantGet(t *testing.T) {
func TestFetchGraph(t *testing.T) { func TestFetchGraph(t *testing.T) {
var dservs []DAGService var dservs []DAGService
bsis := bstest.Mocks(t, 2) bsis := bstest.Mocks(2)
for _, bsi := range bsis { for _, bsi := range bsis {
dservs = append(dservs, NewDAGService(bsi)) dservs = append(dservs, NewDAGService(bsi))
} }
read := io.LimitReader(u.NewTimeSeededRand(), 1024*32) read := io.LimitReader(u.NewTimeSeededRand(), 1024*32)
spl := &chunk.SizeSplitter{512} root, err := imp.BuildDagFromReader(dservs[0], chunk.NewSizeSplitter(read, 512), nil)
root, err := imp.BuildDagFromReader(read, dservs[0], spl, nil)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
...@@ -319,10 +317,7 @@ func TestFetchGraph(t *testing.T) { ...@@ -319,10 +317,7 @@ func TestFetchGraph(t *testing.T) {
} }
// create an offline dagstore and ensure all blocks were fetched // create an offline dagstore and ensure all blocks were fetched
bs, err := bserv.New(bsis[1].Blockstore, offline.Exchange(bsis[1].Blockstore)) bs := bserv.New(bsis[1].Blockstore, offline.Exchange(bsis[1].Blockstore))
if err != nil {
t.Fatal(err)
}
offline_ds := NewDAGService(bs) offline_ds := NewDAGService(bs)
ks := key.NewKeySet() ks := key.NewKeySet()
...@@ -334,14 +329,11 @@ func TestFetchGraph(t *testing.T) { ...@@ -334,14 +329,11 @@ func TestFetchGraph(t *testing.T) {
} }
func TestEnumerateChildren(t *testing.T) { func TestEnumerateChildren(t *testing.T) {
bsi := bstest.Mocks(t, 1) bsi := bstest.Mocks(1)
ds := NewDAGService(bsi[0]) ds := NewDAGService(bsi[0])
spl := &chunk.SizeSplitter{512}
read := io.LimitReader(u.NewTimeSeededRand(), 1024*1024) read := io.LimitReader(u.NewTimeSeededRand(), 1024*1024)
root, err := imp.BuildDagFromReader(ds, chunk.NewSizeSplitter(read, 512), nil)
root, err := imp.BuildDagFromReader(read, ds, spl, nil)
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment