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.
master
Klaus Post 4 years ago committed by GitHub
parent 37da0c647e
commit 9a1615768d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      cmd/xl-storage_test.go

@ -1704,7 +1704,8 @@ func TestXLStorageVerifyFile(t *testing.T) {
if err != nil { if err != nil {
t.Fatal(err) 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) t.Fatal(err)
} }
f.Close() f.Close()

Loading…
Cancel
Save