From 353870635237c03656fce62c670d36e4b8277d68 Mon Sep 17 00:00:00 2001 From: Burak Sezer Date: Sat, 10 Jul 2021 16:04:51 +0300 Subject: [PATCH] refactor: remove useless statements --- internal/bufpool/bufpool_test.go | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/internal/bufpool/bufpool_test.go b/internal/bufpool/bufpool_test.go index 435f1ca0..46276267 100644 --- a/internal/bufpool/bufpool_test.go +++ b/internal/bufpool/bufpool_test.go @@ -18,20 +18,14 @@ import "testing" func TestBufPool(t *testing.T) { p := New() - - count := 1000 - mebibyte := 1 << 20 - total := 10 * mebibyte - - b := make([]byte, total/count) - - for i := 0; i < count; i++ { + b := make([]byte, 100) + for i := 0; i < 1000; i++ { buf := p.Get() nr, err := buf.Write(b) if err != nil { t.Fatalf("Expected nil. Got: %v", err) } - if nr != total/count { + if nr != 100 { t.Fatalf("Expected 10. Got: %d", nr) } p.Put(buf)