Fix flaky TestXLStorageVerifyFile (#10398)

`TestXLStorageVerifyFile` would fail 1 in 256 if the first random character was 'a'.

Instead write 256 bytes which has 1 in 256^256 probability.
This commit is contained in:
Klaus Post 2020-09-02 09:42:24 -07:00 committed by GitHub
parent 37da0c647e
commit 9a1615768d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1704,7 +1704,8 @@ func TestXLStorageVerifyFile(t *testing.T) {
if err != nil {
t.Fatal(err)
}
if _, err := f.WriteString("a"); err != nil {
// Replace first 256 with 'a'.
if _, err := f.WriteString(strings.Repeat("a", 256)); err != nil {
t.Fatal(err)
}
f.Close()