fix test
diff --git a/client_test.go b/client_test.go
index b72ee24..83a0243 100644
--- a/client_test.go
+++ b/client_test.go
@@ -158,7 +158,10 @@
assert.Equal(t, beforeWritePkgNum, conn.writePkgNum)
assert.Equal(t, beforeWriteBytes, conn.writeBytes)
ss.SetCompressType(CompressSnappy)
- l, err = ss.WriteBytesArray(pkgs...)
+ // net.Buffer.WriteTo would consume the memory of pkgs, we should allocate another one for testing
+ var anotherPkgs [][]byte
+ anotherPkgs = append(anotherPkgs, []byte("hello"), []byte("hello"))
+ l, err = ss.WriteBytesArray(anotherPkgs...)
assert.Nil(t, err)
assert.True(t, l == 10)
beforeWritePkgNum.Add(2)