Skip to content

Commit

Permalink
Add greater leniency to mixer rate-limit test (#314)
Browse files Browse the repository at this point in the history
* Add greater leniency to mixer rate-limit test

* Run gofmt


Former-commit-id: 4496def
  • Loading branch information
douglas-reid authored and sebastienvas committed May 23, 2017
1 parent 64de8c0 commit 3be4d4f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/e2e/tests/mixer/mixer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -387,11 +387,11 @@ func TestRateLimit(t *testing.T) {
return
}
// rate-limit set to 5 qps, sending a request every 1/10th of a second,
// modulo gorouting scheduling, etc.
// there should be ~150 "too many rateLimitedReqs" observed. check for
// greater than 100 to allow for differences in routing, etc.
if rateLimitedReqs.value < 100 {
t.Errorf("Bad metric value: got %f, want at least 100", rateLimitedReqs.value)
// modulo goroutine scheduling, etc., with slightly less than 7 qps going
// to the rate-limited service. there should be ~100 429s observed.
// check for greater than 60 to allow for differences in traffic generation, etc.
if rateLimitedReqs.value < 60 {
t.Errorf("Bad metric value: got %f, want at least 60", rateLimitedReqs.value)
}

// check to make sure that some requests were accepted and processed
Expand Down

0 comments on commit 3be4d4f

Please sign in to comment.