run cronjob every 1minute(means 1s) in UT

This commit is contained in:
pacoxu 2021-02-02 18:54:50 +08:00
parent e161051c83
commit 81e0ebcde9

View File

@ -367,9 +367,9 @@ func TestController2_updateCronJob(t *testing.T) {
}, },
args: args{ args: args{
oldJobSchedule: "30 * * * *", oldJobSchedule: "30 * * * *",
newJobSchedule: "1 * * * *", newJobSchedule: "*/1 * * * *",
}, },
deltaTimeForQueue: 61*time.Second + nextScheduleDelta, deltaTimeForQueue: 1*time.Second + nextScheduleDelta,
roundOffTimeDuration: 750 * time.Millisecond, roundOffTimeDuration: 750 * time.Millisecond,
}, },
// TODO: Add more test cases for updating scheduling. // TODO: Add more test cases for updating scheduling.