|
|
@ -185,10 +185,10 @@ func TestManagerHBTiming(t *testing.T) {
|
|
|
|
hb := 100
|
|
|
|
hb := 100
|
|
|
|
pings := 10
|
|
|
|
pings := 10
|
|
|
|
|
|
|
|
|
|
|
|
// expected time with some tolerance for other events
|
|
|
|
// expected time with tolerance for other logic and worst case rand timeout
|
|
|
|
expected := time.Duration(pings*hb+5) * time.Millisecond
|
|
|
|
expected := time.Duration(pings*hb+15) * time.Millisecond
|
|
|
|
|
|
|
|
|
|
|
|
go manager.HeartBeat(ch, hb, 0, time.Millisecond)
|
|
|
|
go manager.HeartBeat(ch, hb, 1, time.Millisecond)
|
|
|
|
|
|
|
|
|
|
|
|
iter := 0
|
|
|
|
iter := 0
|
|
|
|
start := time.Now()
|
|
|
|
start := time.Now()
|
|
|
|