summaryrefslogtreecommitdiffstats
path: root/modules/cron
diff options
context:
space:
mode:
authorUnknown <joe2010xtmf@163.com>2014-06-16 23:19:25 -0400
committerUnknown <joe2010xtmf@163.com>2014-06-16 23:19:25 -0400
commit8d3276cab0bb554d63a38ddf3d065f247cf9b3d8 (patch)
treedab129f635e8784c8d1cbcbf2d9a6f41ee999d58 /modules/cron
parentd952b4200c7c024ff5a809a3885bc79be9e4cce9 (diff)
downloadgitea-8d3276cab0bb554d63a38ddf3d065f247cf9b3d8.tar.gz
gitea-8d3276cab0bb554d63a38ddf3d065f247cf9b3d8.zip
Fix test cases
Diffstat (limited to 'modules/cron')
-rw-r--r--modules/cron/cron_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/modules/cron/cron_test.go b/modules/cron/cron_test.go
index 9822e8eda7..417247a05a 100644
--- a/modules/cron/cron_test.go
+++ b/modules/cron/cron_test.go
@@ -154,9 +154,9 @@ func TestRunningMultipleSchedules(t *testing.T) {
cron.AddFunc("", "0 0 0 1 1 ?", func() {})
cron.AddFunc("", "0 0 0 31 12 ?", func() {})
cron.AddFunc("", "* * * * * ?", func() { wg.Done() })
- cron.Schedule("", Every(time.Minute), FuncJob(func() {}))
- cron.Schedule("", Every(time.Second), FuncJob(func() { wg.Done() }))
- cron.Schedule("", Every(time.Hour), FuncJob(func() {}))
+ cron.Schedule("", "", Every(time.Minute), FuncJob(func() {}))
+ cron.Schedule("", "", Every(time.Second), FuncJob(func() { wg.Done() }))
+ cron.Schedule("", "", Every(time.Hour), FuncJob(func() {}))
cron.Start()
defer cron.Stop()
@@ -208,8 +208,8 @@ func TestJob(t *testing.T) {
cron.AddJob("", "0 0 0 1 1 ?", testJob{wg, "job1"})
cron.AddJob("", "* * * * * ?", testJob{wg, "job2"})
cron.AddJob("", "1 0 0 1 1 ?", testJob{wg, "job3"})
- cron.Schedule("", Every(5*time.Second+5*time.Nanosecond), testJob{wg, "job4"})
- cron.Schedule("", Every(5*time.Minute), testJob{wg, "job5"})
+ cron.Schedule("", "", Every(5*time.Second+5*time.Nanosecond), testJob{wg, "job4"})
+ cron.Schedule("", "", Every(5*time.Minute), testJob{wg, "job5"})
cron.Start()
defer cron.Stop()