Ready to upgrade the dependencies.

This commit is contained in:
lishuang
2020-07-11 15:28:12 +08:00
parent dbeef1cee4
commit 24e8dc4e9f
4 changed files with 4 additions and 6 deletions

View File

@ -4,7 +4,7 @@ import (
"fmt"
"github.com/eyebluecn/tank/code/core"
"github.com/eyebluecn/tank/code/tool/util"
"github.com/robfig/cron"
"github.com/robfig/cron/v3"
"log"
"strings"
"testing"
@ -28,13 +28,14 @@ func TestCron(t *testing.T) {
i := 0
c := cron.New()
spec := "*/1 * * * * ?"
err := c.AddFunc(spec, func() {
entryId, err := c.AddFunc(spec, func() {
i++
log.Println("cron running:", i)
if i == 3 {
panic("intent to panic.")
}
})
fmt.Printf("entryId = %d", entryId)
core.PanicError(err)
c.Start()