Skip to content

Commit

Permalink
Add missing test for go/bucketpool (#14944)
Browse files Browse the repository at this point in the history
Signed-off-by: Noble Mittal <noblemittal@outlook.com>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Co-authored-by: Florent Poinsard <florent.poinsard@outlook.fr>
  • Loading branch information
beingnoble03 and frouioui authored Jan 15, 2024
1 parent 51ca03e commit 7f4c982
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 7f4c982

Please sign in to comment.