readAllData: Reuse small file buffers (#13530)

(Re)use small buffers for small readAllData operations.
This commit is contained in:
Klaus Post
2021-10-28 17:02:22 -07:00
committed by GitHub
parent 2f1ee25f50
commit c603f85488
3 changed files with 27 additions and 4 deletions

View File

@@ -443,7 +443,8 @@ func TestXLStorageReadAll(t *testing.T) {
for i, testCase := range testCases {
dataRead, err = xlStorage.ReadAll(context.Background(), testCase.volume, testCase.path)
if err != testCase.err {
t.Fatalf("TestXLStorage %d: Expected err \"%s\", got err \"%s\"", i+1, testCase.err, err)
t.Errorf("TestXLStorage %d: Expected err \"%v\", got err \"%v\"", i+1, testCase.err, err)
continue
}
if err == nil {
if string(dataRead) != string([]byte("Hello, World")) {