lib/model, lib/weakhash: Abort pulling quicker on folder stop (ref #5028)

This commit is contained in:
Simon Frei
2018-07-04 09:07:33 +02:00
committed by Audrius Butkevicius
parent 5bb72dfe5d
commit 0f0290d574
6 changed files with 118 additions and 39 deletions

View File

@@ -7,6 +7,7 @@
package weakhash
import (
"context"
"os"
"testing"
@@ -28,7 +29,7 @@ func BenchmarkFind1MFile(b *testing.B) {
if err != nil {
b.Fatal(err)
}
_, err = Find(fd, []uint32{0, 1, 2}, size)
_, err = Find(context.Background(), fd, []uint32{0, 1, 2}, size)
if err != nil {
b.Fatal(err)
}