2016-05-24 20:52:19 +00:00
|
|
|
/*
|
2016-07-18 20:24:57 +00:00
|
|
|
Copyright 2016 The Kubernetes Authors.
|
2016-05-24 20:52:19 +00:00
|
|
|
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
you may not use this file except in compliance with the License.
|
|
|
|
You may obtain a copy of the License at
|
|
|
|
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
See the License for the specific language governing permissions and
|
|
|
|
limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2016-11-01 22:46:23 +00:00
|
|
|
package cronjob
|
2016-05-24 20:52:19 +00:00
|
|
|
|
|
|
|
import (
|
2016-08-11 01:16:09 +00:00
|
|
|
"strings"
|
2016-05-24 20:52:19 +00:00
|
|
|
"testing"
|
|
|
|
"time"
|
|
|
|
|
2017-06-22 18:04:37 +00:00
|
|
|
batchv1 "k8s.io/api/batch/v1"
|
2017-08-28 12:17:21 +00:00
|
|
|
batchv1beta1 "k8s.io/api/batch/v1beta1"
|
2017-06-22 18:24:23 +00:00
|
|
|
"k8s.io/api/core/v1"
|
|
|
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
|
|
|
"k8s.io/apimachinery/pkg/types"
|
2016-05-24 20:52:19 +00:00
|
|
|
)
|
|
|
|
|
2017-06-13 23:00:29 +00:00
|
|
|
func boolptr(b bool) *bool { return &b }
|
|
|
|
|
2016-05-24 20:52:19 +00:00
|
|
|
func TestGetJobFromTemplate(t *testing.T) {
|
|
|
|
// getJobFromTemplate() needs to take the job template and copy the labels and annotations
|
|
|
|
// and other fields, and add a created-by reference.
|
|
|
|
|
|
|
|
var one int64 = 1
|
|
|
|
var no bool = false
|
|
|
|
|
2017-08-28 12:17:21 +00:00
|
|
|
sj := batchv1beta1.CronJob{
|
2017-01-17 03:38:19 +00:00
|
|
|
ObjectMeta: metav1.ObjectMeta{
|
2016-11-01 22:46:23 +00:00
|
|
|
Name: "mycronjob",
|
2016-05-24 20:52:19 +00:00
|
|
|
Namespace: "snazzycats",
|
|
|
|
UID: types.UID("1a2b3c"),
|
2016-12-12 10:55:35 +00:00
|
|
|
SelfLink: "/apis/batch/v1/namespaces/snazzycats/jobs/mycronjob",
|
2016-05-24 20:52:19 +00:00
|
|
|
},
|
2017-08-28 12:17:21 +00:00
|
|
|
Spec: batchv1beta1.CronJobSpec{
|
2016-08-08 13:41:20 +00:00
|
|
|
Schedule: "* * * * ?",
|
2017-08-28 12:17:21 +00:00
|
|
|
ConcurrencyPolicy: batchv1beta1.AllowConcurrent,
|
|
|
|
JobTemplate: batchv1beta1.JobTemplateSpec{
|
2017-01-17 03:38:19 +00:00
|
|
|
ObjectMeta: metav1.ObjectMeta{
|
2016-05-24 20:52:19 +00:00
|
|
|
Labels: map[string]string{"a": "b"},
|
|
|
|
Annotations: map[string]string{"x": "y"},
|
|
|
|
},
|
2017-02-22 11:55:58 +00:00
|
|
|
Spec: batchv1.JobSpec{
|
2016-05-24 20:52:19 +00:00
|
|
|
ActiveDeadlineSeconds: &one,
|
|
|
|
ManualSelector: &no,
|
2016-11-18 20:50:17 +00:00
|
|
|
Template: v1.PodTemplateSpec{
|
2017-01-17 03:38:19 +00:00
|
|
|
ObjectMeta: metav1.ObjectMeta{
|
2016-05-24 20:52:19 +00:00
|
|
|
Labels: map[string]string{
|
|
|
|
"foo": "bar",
|
|
|
|
},
|
|
|
|
},
|
2016-11-18 20:50:17 +00:00
|
|
|
Spec: v1.PodSpec{
|
|
|
|
Containers: []v1.Container{
|
2016-05-24 20:52:19 +00:00
|
|
|
{Image: "foo/bar"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
2017-02-22 11:55:58 +00:00
|
|
|
var job *batchv1.Job
|
2016-08-11 01:16:09 +00:00
|
|
|
job, err := getJobFromTemplate(&sj, time.Time{})
|
2016-05-24 20:52:19 +00:00
|
|
|
if err != nil {
|
|
|
|
t.Errorf("Did not expect error: %s", err)
|
|
|
|
}
|
2016-11-01 22:46:23 +00:00
|
|
|
if !strings.HasPrefix(job.ObjectMeta.Name, "mycronjob-") {
|
2016-08-11 01:16:09 +00:00
|
|
|
t.Errorf("Wrong Name")
|
2016-05-24 20:52:19 +00:00
|
|
|
}
|
|
|
|
if len(job.ObjectMeta.Labels) != 1 {
|
|
|
|
t.Errorf("Wrong number of labels")
|
|
|
|
}
|
2017-10-30 19:49:44 +00:00
|
|
|
if len(job.ObjectMeta.Annotations) != 1 {
|
2016-05-24 20:52:19 +00:00
|
|
|
t.Errorf("Wrong number of annotations")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestGetParentUIDFromJob(t *testing.T) {
|
2017-02-22 11:55:58 +00:00
|
|
|
j := &batchv1.Job{
|
2017-01-17 03:38:19 +00:00
|
|
|
ObjectMeta: metav1.ObjectMeta{
|
2016-05-24 20:52:19 +00:00
|
|
|
Name: "foobar",
|
2017-01-22 03:36:02 +00:00
|
|
|
Namespace: metav1.NamespaceDefault,
|
2016-05-24 20:52:19 +00:00
|
|
|
},
|
2017-02-22 11:55:58 +00:00
|
|
|
Spec: batchv1.JobSpec{
|
2016-12-03 18:57:26 +00:00
|
|
|
Selector: &metav1.LabelSelector{
|
2016-05-24 20:52:19 +00:00
|
|
|
MatchLabels: map[string]string{"foo": "bar"},
|
|
|
|
},
|
2016-11-18 20:50:17 +00:00
|
|
|
Template: v1.PodTemplateSpec{
|
2017-01-17 03:38:19 +00:00
|
|
|
ObjectMeta: metav1.ObjectMeta{
|
2016-05-24 20:52:19 +00:00
|
|
|
Labels: map[string]string{
|
|
|
|
"foo": "bar",
|
|
|
|
},
|
|
|
|
},
|
2016-11-18 20:50:17 +00:00
|
|
|
Spec: v1.PodSpec{
|
|
|
|
Containers: []v1.Container{
|
2016-05-24 20:52:19 +00:00
|
|
|
{Image: "foo/bar"},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
2017-02-22 11:55:58 +00:00
|
|
|
Status: batchv1.JobStatus{
|
|
|
|
Conditions: []batchv1.JobCondition{{
|
|
|
|
Type: batchv1.JobComplete,
|
2016-11-18 20:50:17 +00:00
|
|
|
Status: v1.ConditionTrue,
|
2016-05-24 20:52:19 +00:00
|
|
|
}},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
{
|
2017-06-13 23:00:29 +00:00
|
|
|
// Case 1: No ControllerRef
|
2016-05-24 20:52:19 +00:00
|
|
|
_, found := getParentUIDFromJob(*j)
|
|
|
|
|
|
|
|
if found {
|
|
|
|
t.Errorf("Unexpectedly found uid")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
2017-06-13 23:00:29 +00:00
|
|
|
// Case 2: Has ControllerRef
|
|
|
|
j.ObjectMeta.SetOwnerReferences([]metav1.OwnerReference{
|
|
|
|
{
|
|
|
|
Kind: "CronJob",
|
|
|
|
UID: types.UID("5ef034e0-1890-11e6-8935-42010af0003e"),
|
|
|
|
Controller: boolptr(true),
|
|
|
|
},
|
|
|
|
})
|
2016-05-24 20:52:19 +00:00
|
|
|
|
|
|
|
expectedUID := types.UID("5ef034e0-1890-11e6-8935-42010af0003e")
|
|
|
|
|
|
|
|
uid, found := getParentUIDFromJob(*j)
|
|
|
|
if !found {
|
|
|
|
t.Errorf("Unexpectedly did not find uid")
|
|
|
|
} else if uid != expectedUID {
|
|
|
|
t.Errorf("Wrong UID: %v", uid)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestGroupJobsByParent(t *testing.T) {
|
|
|
|
uid1 := types.UID("11111111-1111-1111-1111-111111111111")
|
|
|
|
uid2 := types.UID("22222222-2222-2222-2222-222222222222")
|
|
|
|
uid3 := types.UID("33333333-3333-3333-3333-333333333333")
|
2017-06-13 23:00:29 +00:00
|
|
|
|
|
|
|
ownerReference1 := metav1.OwnerReference{
|
|
|
|
Kind: "CronJob",
|
|
|
|
UID: uid1,
|
|
|
|
Controller: boolptr(true),
|
|
|
|
}
|
|
|
|
|
|
|
|
ownerReference2 := metav1.OwnerReference{
|
|
|
|
Kind: "CronJob",
|
|
|
|
UID: uid2,
|
|
|
|
Controller: boolptr(true),
|
|
|
|
}
|
|
|
|
|
|
|
|
ownerReference3 := metav1.OwnerReference{
|
|
|
|
Kind: "CronJob",
|
|
|
|
UID: uid3,
|
|
|
|
Controller: boolptr(true),
|
|
|
|
}
|
2016-05-24 20:52:19 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
// Case 1: There are no jobs and scheduledJobs
|
2017-02-22 11:55:58 +00:00
|
|
|
js := []batchv1.Job{}
|
2017-03-20 16:43:10 +00:00
|
|
|
jobsBySj := groupJobsByParent(js)
|
2016-05-24 20:52:19 +00:00
|
|
|
if len(jobsBySj) != 0 {
|
|
|
|
t.Errorf("Wrong number of items in map")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2017-03-20 16:43:10 +00:00
|
|
|
// Case 2: there is one controller with one job it created.
|
2017-02-22 11:55:58 +00:00
|
|
|
js := []batchv1.Job{
|
2017-06-13 23:00:29 +00:00
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "x", OwnerReferences: []metav1.OwnerReference{ownerReference1}}},
|
2016-05-24 20:52:19 +00:00
|
|
|
}
|
2017-03-20 16:43:10 +00:00
|
|
|
jobsBySj := groupJobsByParent(js)
|
2016-05-24 20:52:19 +00:00
|
|
|
|
|
|
|
if len(jobsBySj) != 1 {
|
|
|
|
t.Errorf("Wrong number of items in map")
|
|
|
|
}
|
|
|
|
jobList1, found := jobsBySj[uid1]
|
|
|
|
if !found {
|
|
|
|
t.Errorf("Key not found")
|
|
|
|
}
|
|
|
|
if len(jobList1) != 1 {
|
|
|
|
t.Errorf("Wrong number of items in map")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
2017-03-20 16:43:10 +00:00
|
|
|
// Case 3: Two namespaces, one has two jobs from one controller, other has 3 jobs from two controllers.
|
2016-05-24 20:52:19 +00:00
|
|
|
// There are also two jobs with no created-by annotation.
|
2017-02-22 11:55:58 +00:00
|
|
|
js := []batchv1.Job{
|
2017-06-13 23:00:29 +00:00
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "x", OwnerReferences: []metav1.OwnerReference{ownerReference1}}},
|
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "x", OwnerReferences: []metav1.OwnerReference{ownerReference2}}},
|
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "c", Namespace: "x", OwnerReferences: []metav1.OwnerReference{ownerReference1}}},
|
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "d", Namespace: "x", OwnerReferences: []metav1.OwnerReference{}}},
|
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "a", Namespace: "y", OwnerReferences: []metav1.OwnerReference{ownerReference3}}},
|
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "b", Namespace: "y", OwnerReferences: []metav1.OwnerReference{ownerReference3}}},
|
|
|
|
{ObjectMeta: metav1.ObjectMeta{Name: "d", Namespace: "y", OwnerReferences: []metav1.OwnerReference{}}},
|
2016-05-24 20:52:19 +00:00
|
|
|
}
|
|
|
|
|
2017-03-20 16:43:10 +00:00
|
|
|
jobsBySj := groupJobsByParent(js)
|
2016-05-24 20:52:19 +00:00
|
|
|
|
|
|
|
if len(jobsBySj) != 3 {
|
|
|
|
t.Errorf("Wrong number of items in map")
|
|
|
|
}
|
|
|
|
jobList1, found := jobsBySj[uid1]
|
|
|
|
if !found {
|
|
|
|
t.Errorf("Key not found")
|
|
|
|
}
|
|
|
|
if len(jobList1) != 2 {
|
|
|
|
t.Errorf("Wrong number of items in map")
|
|
|
|
}
|
|
|
|
jobList2, found := jobsBySj[uid2]
|
|
|
|
if !found {
|
|
|
|
t.Errorf("Key not found")
|
|
|
|
}
|
|
|
|
if len(jobList2) != 1 {
|
|
|
|
t.Errorf("Wrong number of items in map")
|
|
|
|
}
|
|
|
|
jobList3, found := jobsBySj[uid3]
|
|
|
|
if !found {
|
|
|
|
t.Errorf("Key not found")
|
|
|
|
}
|
|
|
|
if len(jobList3) != 2 {
|
|
|
|
t.Errorf("Wrong number of items in map")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestGetRecentUnmetScheduleTimes(t *testing.T) {
|
|
|
|
// schedule is hourly on the hour
|
2016-08-08 13:41:20 +00:00
|
|
|
schedule := "0 * * * ?"
|
2016-05-24 20:52:19 +00:00
|
|
|
// T1 is a scheduled start time of that schedule
|
|
|
|
T1, err := time.Parse(time.RFC3339, "2016-05-19T10:00:00Z")
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("test setup error: %v", err)
|
|
|
|
}
|
|
|
|
// T2 is a scheduled start time of that schedule after T1
|
|
|
|
T2, err := time.Parse(time.RFC3339, "2016-05-19T11:00:00Z")
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("test setup error: %v", err)
|
|
|
|
}
|
|
|
|
|
2017-08-28 12:17:21 +00:00
|
|
|
sj := batchv1beta1.CronJob{
|
2017-01-17 03:38:19 +00:00
|
|
|
ObjectMeta: metav1.ObjectMeta{
|
2016-11-01 22:46:23 +00:00
|
|
|
Name: "mycronjob",
|
2017-01-22 03:36:02 +00:00
|
|
|
Namespace: metav1.NamespaceDefault,
|
2016-05-24 20:52:19 +00:00
|
|
|
UID: types.UID("1a2b3c"),
|
|
|
|
},
|
2017-08-28 12:17:21 +00:00
|
|
|
Spec: batchv1beta1.CronJobSpec{
|
2016-05-24 20:52:19 +00:00
|
|
|
Schedule: schedule,
|
2017-08-28 12:17:21 +00:00
|
|
|
ConcurrencyPolicy: batchv1beta1.AllowConcurrent,
|
|
|
|
JobTemplate: batchv1beta1.JobTemplateSpec{},
|
2016-05-24 20:52:19 +00:00
|
|
|
},
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// Case 1: no known start times, and none needed yet.
|
|
|
|
// Creation time is before T1.
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.ObjectMeta.CreationTimestamp = metav1.Time{Time: T1.Add(-10 * time.Minute)}
|
2016-05-24 20:52:19 +00:00
|
|
|
// Current time is more than creation time, but less than T1.
|
|
|
|
now := T1.Add(-7 * time.Minute)
|
|
|
|
times, err := getRecentUnmetScheduleTimes(sj, now)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("unexpected error: %v", err)
|
|
|
|
}
|
|
|
|
if len(times) != 0 {
|
|
|
|
t.Errorf("expected no start times, got: %v", times)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// Case 2: no known start times, and one needed.
|
|
|
|
// Creation time is before T1.
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.ObjectMeta.CreationTimestamp = metav1.Time{Time: T1.Add(-10 * time.Minute)}
|
2016-05-24 20:52:19 +00:00
|
|
|
// Current time is after T1
|
|
|
|
now := T1.Add(2 * time.Second)
|
|
|
|
times, err := getRecentUnmetScheduleTimes(sj, now)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("unexpected error: %v", err)
|
|
|
|
}
|
|
|
|
if len(times) != 1 {
|
|
|
|
t.Errorf("expected 1 start time, got: %v", times)
|
|
|
|
} else if !times[0].Equal(T1) {
|
|
|
|
t.Errorf("expected: %v, got: %v", T1, times[0])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// Case 3: known LastScheduleTime, no start needed.
|
|
|
|
// Creation time is before T1.
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.ObjectMeta.CreationTimestamp = metav1.Time{Time: T1.Add(-10 * time.Minute)}
|
2016-05-24 20:52:19 +00:00
|
|
|
// Status shows a start at the expected time.
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.Status.LastScheduleTime = &metav1.Time{Time: T1}
|
2016-05-24 20:52:19 +00:00
|
|
|
// Current time is after T1
|
|
|
|
now := T1.Add(2 * time.Minute)
|
|
|
|
times, err := getRecentUnmetScheduleTimes(sj, now)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("unexpected error: %v", err)
|
|
|
|
}
|
|
|
|
if len(times) != 0 {
|
2017-08-01 10:56:06 +00:00
|
|
|
t.Errorf("expected 0 start times, got: %v", times)
|
2016-05-24 20:52:19 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// Case 4: known LastScheduleTime, a start needed
|
|
|
|
// Creation time is before T1.
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.ObjectMeta.CreationTimestamp = metav1.Time{Time: T1.Add(-10 * time.Minute)}
|
2016-05-24 20:52:19 +00:00
|
|
|
// Status shows a start at the expected time.
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.Status.LastScheduleTime = &metav1.Time{Time: T1}
|
2016-05-24 20:52:19 +00:00
|
|
|
// Current time is after T1 and after T2
|
|
|
|
now := T2.Add(5 * time.Minute)
|
|
|
|
times, err := getRecentUnmetScheduleTimes(sj, now)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("unexpected error: %v", err)
|
|
|
|
}
|
|
|
|
if len(times) != 1 {
|
2017-08-01 10:56:06 +00:00
|
|
|
t.Errorf("expected 1 start times, got: %v", times)
|
2016-05-24 20:52:19 +00:00
|
|
|
} else if !times[0].Equal(T2) {
|
|
|
|
t.Errorf("expected: %v, got: %v", T1, times[0])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
|
|
|
// Case 5: known LastScheduleTime, two starts needed
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.ObjectMeta.CreationTimestamp = metav1.Time{Time: T1.Add(-2 * time.Hour)}
|
|
|
|
sj.Status.LastScheduleTime = &metav1.Time{Time: T1.Add(-1 * time.Hour)}
|
2016-05-24 20:52:19 +00:00
|
|
|
// Current time is after T1 and after T2
|
|
|
|
now := T2.Add(5 * time.Minute)
|
|
|
|
times, err := getRecentUnmetScheduleTimes(sj, now)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("unexpected error: %v", err)
|
|
|
|
}
|
|
|
|
if len(times) != 2 {
|
2017-08-01 10:56:06 +00:00
|
|
|
t.Errorf("expected 2 start times, got: %v", times)
|
2016-05-24 20:52:19 +00:00
|
|
|
} else {
|
|
|
|
if !times[0].Equal(T1) {
|
|
|
|
t.Errorf("expected: %v, got: %v", T1, times[0])
|
|
|
|
}
|
|
|
|
if !times[1].Equal(T2) {
|
|
|
|
t.Errorf("expected: %v, got: %v", T2, times[1])
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
{
|
2017-01-07 21:06:02 +00:00
|
|
|
// Case 6: now is way way ahead of last start time, and there is no deadline.
|
2016-12-03 18:57:26 +00:00
|
|
|
sj.ObjectMeta.CreationTimestamp = metav1.Time{Time: T1.Add(-2 * time.Hour)}
|
|
|
|
sj.Status.LastScheduleTime = &metav1.Time{Time: T1.Add(-1 * time.Hour)}
|
2016-05-24 20:52:19 +00:00
|
|
|
now := T2.Add(10 * 24 * time.Hour)
|
|
|
|
_, err := getRecentUnmetScheduleTimes(sj, now)
|
|
|
|
if err == nil {
|
2017-07-31 06:42:04 +00:00
|
|
|
t.Errorf("expected an error")
|
2016-05-24 20:52:19 +00:00
|
|
|
}
|
|
|
|
}
|
2017-01-07 21:06:02 +00:00
|
|
|
{
|
|
|
|
// Case 7: now is way way ahead of last start time, but there is a short deadline.
|
|
|
|
sj.ObjectMeta.CreationTimestamp = metav1.Time{Time: T1.Add(-2 * time.Hour)}
|
|
|
|
sj.Status.LastScheduleTime = &metav1.Time{Time: T1.Add(-1 * time.Hour)}
|
|
|
|
now := T2.Add(10 * 24 * time.Hour)
|
|
|
|
// Deadline is short
|
|
|
|
deadline := int64(2 * 60 * 60)
|
|
|
|
sj.Spec.StartingDeadlineSeconds = &deadline
|
|
|
|
_, err := getRecentUnmetScheduleTimes(sj, now)
|
|
|
|
if err != nil {
|
|
|
|
t.Errorf("unexpected error")
|
|
|
|
}
|
|
|
|
}
|
2017-02-27 04:14:36 +00:00
|
|
|
}
|