]> Sergey Matveev's repositories - btrtrc.git/commitdiff
Fix panic in benchmark caused by new logging
authorMatt Joiner <anacrolix@gmail.com>
Mon, 29 Jan 2018 08:16:55 +0000 (19:16 +1100)
committerMatt Joiner <anacrolix@gmail.com>
Mon, 29 Jan 2018 08:16:55 +0000 (19:16 +1100)
torrent_test.go

index e50618d0af6a20097d4c02aa2edb3ddcd409fade..43887e165dbda74816727fca42a662d2e9f7fa72 100644 (file)
@@ -80,6 +80,7 @@ func BenchmarkUpdatePiecePriorities(b *testing.B) {
                pieceLength = 256 << 10
        )
        cl := &Client{}
+       cl.initLogger()
        t := cl.newTorrent(metainfo.Hash{}, nil)
        require.NoError(b, t.setInfo(&metainfo.Info{
                Pieces:      make([]byte, metainfo.HashSize*numPieces),