Merge pull request #5761 from filecoin-project/fix/testunpadreader-go116

Fix TestUnpadReader on Go 1.16
This commit is contained in:
Łukasz Magiera 2021-03-10 13:13:27 +01:00 committed by GitHub
commit cc490b983a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,7 @@
package fr32_test
import (
"bufio"
"bytes"
"io/ioutil"
"testing"
@ -25,7 +26,8 @@ func TestUnpadReader(t *testing.T) {
t.Fatal(err)
}
readered, err := ioutil.ReadAll(r)
// using bufio reader to make sure reads are big enough for the padreader - it can't handle small reads right now
readered, err := ioutil.ReadAll(bufio.NewReaderSize(r, 512))
if err != nil {
t.Fatal(err)
}