]> Sergey Matveev's repositories - btrtrc.git/blobdiff - storage/test/bench-piece-mark-complete.go
Fix UseSources panicking when sqlite storage is closed
[btrtrc.git] / storage / test / bench-piece-mark-complete.go
index e800e6a90b3eb83897eff56296e7b06bb23756c3..db0049f22674b98ff499bd12745799133d01869a 100644 (file)
@@ -6,9 +6,10 @@ import (
        "sync"
        "testing"
 
+       qt "github.com/frankban/quicktest"
+
        "github.com/anacrolix/torrent/metainfo"
        "github.com/anacrolix/torrent/storage"
-       qt "github.com/frankban/quicktest"
 )
 
 const (
@@ -65,7 +66,7 @@ func BenchmarkPieceMarkComplete(
                        // This might not apply if users of this benchmark don't cache with the expected capacity.
                        c.Assert(pi.Completion(), qt.Equals, storage.Completion{Complete: false, Ok: true})
                        c.Assert(pi.MarkComplete(), qt.IsNil)
-                       c.Assert(pi.Completion(), qt.Equals, storage.Completion{true, true})
+                       c.Assert(pi.Completion(), qt.Equals, storage.Completion{Complete: true, Ok: true})
                        n, err := pi.WriteTo(bytes.NewBuffer(readData[:0]))
                        b.StopTimer()
                        c.Assert(err, qt.IsNil)