mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-12-03 07:00:26 +08:00
增加健康检查定时任务/健康检查可以发送消息
This commit is contained in:
16
internal/tasks/health_check_cluster_task_test.go
Normal file
16
internal/tasks/health_check_cluster_task_test.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package tasks
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHealthCheckClusterTask_loop(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
task := NewHealthCheckClusterTask(10, nil)
|
||||
err := task.loop(10)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log("ok")
|
||||
}
|
||||
Reference in New Issue
Block a user