fix balancer test

pull/381/head
Windfarer 5 years ago
parent 5949c6debf
commit 34e5348c4a
  1. 4
      pkg/net/rpc/warden/balancer/wrr/wrr_test.go

@ -137,8 +137,8 @@ func TestBalancerDone(t *testing.T) {
latency, count := picker.(*wrrPicker).subConns[0].latencySummary()
expectLatency := float64(100*time.Millisecond) / 1e5
if !(expectLatency < latency && latency < (expectLatency+100)) {
t.Fatalf("latency is less than 100ms or greter than 100ms, %f", latency)
if latency < expectLatency || latency > (expectLatency+100) {
t.Fatalf("latency is less than 100ms or greater than 110ms, %f", latency)
}
assert.Equal(t, int64(1), count)

Loading…
Cancel
Save