Skip to content

Commit

Permalink
Fix duplicate import under different aliases
Browse files Browse the repository at this point in the history
  • Loading branch information
anacrolix committed Jan 18, 2021
1 parent fdfd305 commit d560874
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions fs/torrentfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package torrentfs

import (
"context"
netContext "context"
"fmt"
"io/ioutil"
"log"
Expand Down Expand Up @@ -202,9 +201,9 @@ func TestDownloadOnDemand(t *testing.T) {
fs := New(leecher)
defer fs.Destroy()
root, _ := fs.Root()
node, _ := root.(fusefs.NodeStringLookuper).Lookup(netContext.Background(), "greeting")
node, _ := root.(fusefs.NodeStringLookuper).Lookup(context.Background(), "greeting")
var attr fuse.Attr
node.Attr(netContext.Background(), &attr)
node.Attr(context.Background(), &attr)
size := attr.Size
data := make([]byte, size)
h, err := node.(fusefs.NodeOpener).Open(context.TODO(), nil, nil)
Expand All @@ -215,7 +214,7 @@ func TestDownloadOnDemand(t *testing.T) {
var n int
for n < len(data) {
resp := fuse.ReadResponse{Data: data[n:]}
err := h.(fusefs.HandleReader).Read(netContext.Background(), &fuse.ReadRequest{
err := h.(fusefs.HandleReader).Read(context.Background(), &fuse.ReadRequest{
Size: int(size) - n,
Offset: int64(n),
}, &resp)
Expand Down

0 comments on commit d560874

Please sign in to comment.