Skip to content

Commit

Permalink
fix: fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Feb 26, 2023
1 parent 9c87417 commit a0688ff
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion middleware/body_parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,11 @@ func BenchmarkBodyParserBufferPool(b *testing.B) {
return nil
}
err := fn(c)
if err != nil || len(c.RequestBody) != bodySize {
realBodySize := bodySize / 3 * 4
if bodySize%3 != 0 {
realBodySize += 4
}
if err != nil || len(c.RequestBody) != realBodySize {
panic("get request body fail")
}
}
Expand Down

0 comments on commit a0688ff

Please sign in to comment.