Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Charlie17Li committed Mar 27, 2023
1 parent 4a87fe1 commit b426b57
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/ingress/conformance/utils/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -408,12 +408,8 @@ func MakeRequestAndCountExpectedResponse(t *testing.T, r roundtripper.RoundTripp

rate := float64(succ) / totalRequest
minSuccRate, maxSuccRate := math.Min(succRate-rateDeviation, 0), math.Max(succRate+rateDeviation, 1.0)
if 0 < minSuccRate && rate < minSuccRate {
t.Errorf("Test failed, expect the minSuccRate is %v, got %v", minSuccRate, rate)
return
}
if 0 < maxSuccRate && maxSuccRate > rate {
t.Errorf("Test failed, expect the maxSuccRate is %v, got %v", maxSuccRate, rate)
if rate < minSuccRate || maxSuccRate > rate {
t.Errorf("Test failed, expect the minSuccRate is %v, the maxSuccRate is %v, but got %v", minSuccRate, maxSuccRate, rate)
return
}

Expand Down

0 comments on commit b426b57

Please sign in to comment.