fix(quota): fixed failing quota unit tests

This commit is contained in:
Torkel Ödegaard
2015-09-18 08:36:58 +02:00
parent 1f959272c5
commit 5e949b0564
4 changed files with 117 additions and 95 deletions

View File

@@ -18,12 +18,16 @@ const (
var sessionManager *session.Manager
var sessionOptions *session.Options
var startSessionGC func()
var getSessionCount func() int
func init() {
startSessionGC = func() {
sessionManager.GC()
time.AfterFunc(time.Duration(sessionOptions.Gclifetime)*time.Second, startSessionGC)
}
getSessionCount = func() int {
return sessionManager.Count()
}
}
func prepareOptions(opt *session.Options) *session.Options {