Skip to content

Commit

Permalink
rpc_util: remove a wrong test
Browse files Browse the repository at this point in the history
- Our shared buffer pool does not provide initialization, but it performs better. Users must initialize data from the pool themselves if necessary.
  • Loading branch information
hueypark committed Apr 11, 2023
1 parent 056b3e5 commit 0d07cfc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 2 additions & 0 deletions shared_buffer_pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import "sync"
// later release.
type SharedBufferPool interface {
// Get returns a buffer with specified length from the pool.
//
// The returned byte slice may be not zero initialized.
Get(length int) []byte

// Put returns a buffer to the pool.
Expand Down
6 changes: 0 additions & 6 deletions shared_buffer_pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,6 @@ func (s) TestSharedBufferPool(t *testing.T) {
t.Fatalf("Expected buffer of length %d, got %d", l, len(bs))
}

for i, b := range bs {
if b != 0 {
t.Fatalf("Expected buffer to be zeroed, got %d at index %d", b, i)
}
}

p.Put(&bs)
}
}
Expand Down

0 comments on commit 0d07cfc

Please sign in to comment.