]> Sergey Matveev's repositories - btrtrc.git/blobdiff - main_test.go
Drop peer request alloc reservations when peer is closed
[btrtrc.git] / main_test.go
index b86d42fc101307b664538d689dab30d6abd9f3ab..51af26a041374468d11efece53c88b61999942e4 100644 (file)
@@ -1,26 +1,19 @@
 package torrent
 
 import (
-       "io/ioutil"
        "log"
        "os"
        "testing"
-)
 
-var tempDir string
+       _ "github.com/anacrolix/envpprof"
+)
 
 func init() {
-       log.SetFlags(log.LstdFlags | log.Llongfile)
-       var err error
-       tempDir, err = ioutil.TempDir("", "torrent.test")
-       if err != nil {
-               panic(err)
-       }
+       log.SetFlags(log.LstdFlags | log.Lshortfile)
 }
 
 func TestMain(m *testing.M) {
        code := m.Run()
-       os.RemoveAll(tempDir)
        // select {}
        os.Exit(code)
 }