Skip to content

Commit

Permalink
fixed the test so it compiled
Browse files Browse the repository at this point in the history
  • Loading branch information
marksalpeter committed Oct 18, 2015
1 parent d2c27bc commit 4e960f8
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions gocron_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,24 @@
package gocron

import (
"fmt"
"testing"
"time"
"fmt"
)

var err = 1

func task() string {
return "I am a running job."
func task() {
fmt.Println("I am a running job.")
}

func taskWithParams(a int, b string) (a_ int, b_ string) {
return a, b
func taskWithParams(a int, b string) {
fmt.Println(a, b)
}

func TestSecond(*testing.T) {
now := time.Now()
default_scheduler.Every(1).Second().Do(task)
default_scheduler.Every(1).Second().Do(taskWithParams, 1, "hello")
defaultScheduler.Every(1).Second().Do(task)
defaultScheduler.Every(1).Second().Do(taskWithParams, 1, "hello")
defaultScheduler.Start()
time.Sleep(10 * time.Second)
}

0 comments on commit 4e960f8

Please sign in to comment.