test (fix): broken tests

This commit is contained in:
Mickael KERJEAN
2018-11-23 01:14:38 +11:00
parent cb4c98e871
commit bef1716a18
5 changed files with 88 additions and 43 deletions

View File

@ -9,6 +9,7 @@ import (
"net/http"
"net/http/pprof"
"os"
"runtime/debug"
"strconv"
)
@ -33,7 +34,10 @@ func Init(a *App) {
r.Handle("/debug/pprof/heap", pprof.Handler("heap"))
r.Handle("/debug/pprof/threadcreate", pprof.Handler("threadcreate"))
r.Handle("/debug/pprof/block", pprof.Handler("block"))
r.Handle("/debug/pprof/heap", pprof.Handler("heap"))
r.HandleFunc("/debug/free", func(w http.ResponseWriter, r *http.Request) {
debug.FreeOSMemory()
w.Write([]byte("DONE"))
})
}
// API