open-nomad/command/agent/util_test.go
2015-08-16 14:34:38 -07:00

17 lines
245 B
Go

package agent
import (
"testing"
"time"
)
func TestRandomStagger(t *testing.T) {
intv := time.Minute
for i := 0; i < 10; i++ {
stagger := randomStagger(intv)
if stagger < 0 || stagger >= intv {
t.Fatalf("Bad: %v", stagger)
}
}
}