open-nomad/command/agent/util_test.go

17 lines
245 B
Go
Raw Normal View History

2015-08-16 21:34:38 +00:00
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)
}
}
}