mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-04 16:00:24 +08:00
22 lines
336 B
Go
22 lines
336 B
Go
//go:build !plus
|
|
|
|
package tasks_test
|
|
|
|
import (
|
|
"github.com/TeaOSLab/EdgeAPI/internal/tasks"
|
|
"github.com/iwind/TeaGo/dbs"
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestDNSTaskExecutor_Loop(t *testing.T) {
|
|
dbs.NotifyReady()
|
|
|
|
var task = tasks.NewDNSTaskExecutor(10 * time.Second)
|
|
err := task.Loop()
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log("ok")
|
|
}
|