diff --git a/gorush/notification_fcm_test.go b/gorush/notification_fcm_test.go index 5b170ac..d2e1cb2 100644 --- a/gorush/notification_fcm_test.go +++ b/gorush/notification_fcm_test.go @@ -16,6 +16,8 @@ func init() { log.Fatal(err) } + InitWorkers(PushConf.Core.WorkerNum, PushConf.Core.QueueNum) + if err := InitAppStatus(); err != nil { log.Fatal(err) } diff --git a/gorush/notification_test.go b/gorush/notification_test.go index 461eb9b..fffd11d 100644 --- a/gorush/notification_test.go +++ b/gorush/notification_test.go @@ -8,10 +8,6 @@ import ( "github.com/stretchr/testify/assert" ) -func init() { - PushConf = config.BuildDefaultPushConf() - InitWorkers(PushConf.Core.WorkerNum, PushConf.Core.QueueNum) -} func TestCorrectConf(t *testing.T) { PushConf = config.BuildDefaultPushConf() diff --git a/gorush/status.go b/gorush/status.go index c198b79..82ef453 100644 --- a/gorush/status.go +++ b/gorush/status.go @@ -40,6 +40,7 @@ type IosStatus struct { // InitAppStatus for initialize app status func InitAppStatus() error { + LogAccess.Debug("Init App Status Engine as ", PushConf.Stat.Engine) switch PushConf.Stat.Engine { case "memory": StatStorage = memory.New()