diff --git a/statsd/statsd_test.go b/statsd/statsd_test.go
index <HASH>..<HASH> 100644
--- a/statsd/statsd_test.go
+++ b/statsd/statsd_test.go
@@ -1,26 +1,32 @@
 package statsd
 
 import (
-	"io"
 	"testing"
 	"time"
 
 	"github.com/stretchr/testify/assert"
 )
 
-type statsdWriterWrapper struct {
-	io.WriteCloser
-}
+type statsdWriterWrapper struct{}
 
 func (statsdWriterWrapper) SetWriteTimeout(time.Duration) error {
 	return nil
 }
 
+func (statsdWriterWrapper) Close() error {
+	return nil
+}
+
+func (statsdWriterWrapper) Write(p []byte) (n int, err error) {
+	return 0, nil
+}
+
 func TestCustomWriterBufferConfiguration(t *testing.T) {
 	client, err := NewWithWriter(statsdWriterWrapper{})
 	if err != nil {
 		t.Fatal(err)
 	}
+	defer client.Close()
 
 	assert.Equal(t, OptimalUDPPayloadSize, client.bufferPool.bufferMaxSize)
 	assert.Equal(t, DefaultUDPBufferPoolSize, cap(client.bufferPool.pool))
Fix race condition in the test

The race only happen when also runnin the benchmark which leave enough time to the un-closed client to flush