Skip to content

Commit e826318

Browse files
committed
fix test
1 parent 2b78265 commit e826318

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/gofr/service/rate_limiter_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,9 @@ func TestLocalRateLimiter_EnforceLimit(t *testing.T) {
118118
require.Nil(t, resp)
119119
assertRateLimited(t, err)
120120

121-
resp.Body.Close()
121+
if resp != nil {
122+
_ = resp.Body.Close()
123+
}
122124

123125
wait(1100 * time.Millisecond)
124126

0 commit comments

Comments
 (0)