mirror of
https://github.com/pgsty/minio.git
synced 2026-07-20 20:50:22 +03:00
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:
@@ -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()
|
||||||
|
|||||||
Reference in New Issue
Block a user