File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -307,7 +307,7 @@ func BenchmarkRouteTrailingSlashInsensitivity(b *testing.B) {
307307 b .ResetTimer ()
308308 b .ReportAllocs ()
309309
310- for i := 0 ; i < b . N ; i ++ {
310+ for b . Loop () {
311311 // Cause an insensitive match. Test if the retry logic is causing
312312 // slowdowns.
313313 w := PerformRequest (router , http .MethodGet , "/path/" )
@@ -326,7 +326,7 @@ func BenchmarkRouteTrailingSlashInsensitivity(b *testing.B) {
326326 b .ResetTimer ()
327327 b .ReportAllocs ()
328328
329- for i := 0 ; i < b . N ; i ++ {
329+ for b . Loop () {
330330 w := PerformRequest (router , http .MethodGet , "/path" ) // Exact match.
331331 if w .Code != http .StatusOK || w .Body .String () != "path" {
332332 b .Fatalf ("Expected status %d, got %d" , http .StatusOK , w .Code )
@@ -343,7 +343,7 @@ func BenchmarkRouteTrailingSlashInsensitivity(b *testing.B) {
343343 b .ResetTimer ()
344344 b .ReportAllocs ()
345345
346- for i := 0 ; i < b . N ; i ++ {
346+ for b . Loop () {
347347 w := PerformRequest (router , http .MethodGet , "/path/" ) // Redirect.
348348 if w .Code != http .StatusMovedPermanently {
349349 b .Fatalf ("Expected status %d, got %d" , http .StatusMovedPermanently , w .Code )
You can’t perform that action at this time.
0 commit comments