mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-09 03:50:26 +08:00
多个API节点时选择一个作为主节点/优化任务相关代码
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
//go:build plus
|
||||
// +build plus
|
||||
|
||||
package tasks
|
||||
package tasks_test
|
||||
|
||||
import (
|
||||
teaconst "github.com/TeaOSLab/EdgeAPI/internal/const"
|
||||
"github.com/TeaOSLab/EdgeAPI/internal/tasks"
|
||||
"github.com/iwind/TeaGo/dbs"
|
||||
"testing"
|
||||
)
|
||||
@@ -13,7 +14,7 @@ func TestHealthCheckExecutor_Run(t *testing.T) {
|
||||
teaconst.IsPlus = true
|
||||
dbs.NotifyReady()
|
||||
|
||||
executor := NewHealthCheckExecutor(35)
|
||||
executor := tasks.NewHealthCheckExecutor(35)
|
||||
results, err := executor.Run()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user