mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-19 20:40:25 +08:00
优化健康检查代码
This commit is contained in:
17
internal/tasks/health_check_task_test.go
Normal file
17
internal/tasks/health_check_task_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
|
||||
|
||||
package tasks_test
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/tasks"
|
||||
"testing"
|
||||
"time"
|
||||
)
|
||||
|
||||
func TestNewHealthCheckTask(t *testing.T) {
|
||||
var task = tasks.NewHealthCheckTask(1 * time.Minute)
|
||||
err := task.Loop()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user