Skip to content

Commit b426b57

Browse files
committed
fix
1 parent 4a87fe1 commit b426b57

File tree

1 file changed

+2
-6
lines changed
  • test/ingress/conformance/utils/http

1 file changed

+2
-6
lines changed

test/ingress/conformance/utils/http/http.go

+2-6
Original file line numberDiff line numberDiff line change
@@ -408,12 +408,8 @@ func MakeRequestAndCountExpectedResponse(t *testing.T, r roundtripper.RoundTripp
408408

409409
rate := float64(succ) / totalRequest
410410
minSuccRate, maxSuccRate := math.Min(succRate-rateDeviation, 0), math.Max(succRate+rateDeviation, 1.0)
411-
if 0 < minSuccRate && rate < minSuccRate {
412-
t.Errorf("Test failed, expect the minSuccRate is %v, got %v", minSuccRate, rate)
413-
return
414-
}
415-
if 0 < maxSuccRate && maxSuccRate > rate {
416-
t.Errorf("Test failed, expect the maxSuccRate is %v, got %v", maxSuccRate, rate)
411+
if rate < minSuccRate || maxSuccRate > rate {
412+
t.Errorf("Test failed, expect the minSuccRate is %v, the maxSuccRate is %v, but got %v", minSuccRate, maxSuccRate, rate)
417413
return
418414
}
419415

0 commit comments

Comments
 (0)