mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-08 19:40:24 +08:00
多个API节点时选择一个作为主节点/优化任务相关代码
This commit is contained in:
@@ -1,14 +1,15 @@
|
||||
package tasks
|
||||
package tasks_test
|
||||
|
||||
import (
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/tasks"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestHealthCheckClusterTask_loop(t *testing.T) {
|
||||
func TestHealthCheckClusterTask_Loop(t *testing.T) {
|
||||
dbs.NotifyReady()
|
||||
task := NewHealthCheckClusterTask(10, nil)
|
||||
err := task.loop(10)
|
||||
var task = tasks.NewHealthCheckClusterTask(10, nil)
|
||||
err := task.Loop()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user