mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-16 10:00:26 +08:00
支持自动转换图像文件为WebP
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package utils
|
||||
|
||||
import (
|
||||
"github.com/iwind/TeaGo/logs"
|
||||
"sync"
|
||||
"testing"
|
||||
"time"
|
||||
@@ -14,7 +13,7 @@ func TestTicker(t *testing.T) {
|
||||
ticker.Stop()
|
||||
}()
|
||||
for ticker.Next() {
|
||||
logs.Println("tick")
|
||||
t.Log("tick")
|
||||
}
|
||||
t.Log("finished")
|
||||
}
|
||||
@@ -26,10 +25,10 @@ func TestTicker2(t *testing.T) {
|
||||
ticker.Stop()
|
||||
}()
|
||||
for {
|
||||
logs.Println("loop")
|
||||
t.Log("loop")
|
||||
select {
|
||||
case <-ticker.C:
|
||||
logs.Println("tick")
|
||||
t.Log("tick")
|
||||
case <-ticker.S:
|
||||
return
|
||||
}
|
||||
@@ -42,7 +41,7 @@ func TestTickerEvery(t *testing.T) {
|
||||
wg.Add(1)
|
||||
Every(2*time.Second, func(ticker *Ticker) {
|
||||
i++
|
||||
logs.Println("TestTickerEvery i:", i)
|
||||
t.Log("TestTickerEvery i:", i)
|
||||
if i >= 4 {
|
||||
ticker.Stop()
|
||||
wg.Done()
|
||||
|
||||
Reference in New Issue
Block a user