Skip to content

Commit

Permalink
Add missing test for go/bucketpool
Browse files Browse the repository at this point in the history
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
  • Loading branch information
beingnoble03 committed Jan 13, 2024
1 parent 260bf14 commit ad409cf
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions go/bucketpool/bucketpool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,16 @@ func TestPoolTwoSizeNotMultiplier(t *testing.T) {
pool.Put(buf)
}

func TestPoolMaxSizeLessThanMinSize(t *testing.T) {
defer func() {
if r := recover(); r == nil {
t.Errorf("Expected the code to panic")
}
}()

New(15000, 1024)
}

func TestPoolWeirdMaxSize(t *testing.T) {
maxSize := 15000
pool := New(1024, maxSize)
Expand Down

0 comments on commit ad409cf

Please sign in to comment.