feat: add scheduled automatic task matching
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
package store
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestRandomDelaySeconds(t *testing.T) {
|
||||
for index := 0; index < 100; index++ {
|
||||
value := randomDelaySeconds(900, 1200)
|
||||
if value < 900 || value > 1200 {
|
||||
t.Fatalf("delay out of range: %d", value)
|
||||
}
|
||||
}
|
||||
if value := randomDelaySeconds(30, 30); value != 30 {
|
||||
t.Fatalf("fixed delay = %d, want 30", value)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user