mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Merge pull request #16268 from fuweid/fix-TestPageWriterRandom
pkg/ioutil: deflake TestPageWriterRandom
This commit is contained in:
commit
92de641a22
@ -39,8 +39,8 @@ func TestPageWriterRandom(t *testing.T) {
|
||||
if cw.writeBytes > n {
|
||||
t.Fatalf("wrote %d bytes to io.Writer, but only wrote %d bytes", cw.writeBytes, n)
|
||||
}
|
||||
if n-cw.writeBytes > pageBytes {
|
||||
t.Fatalf("got %d bytes pending, expected less than %d bytes", n-cw.writeBytes, pageBytes)
|
||||
if maxPendingBytes := pageBytes + defaultBufferBytes; n-cw.writeBytes > maxPendingBytes {
|
||||
t.Fatalf("got %d bytes pending, expected less than %d bytes", n-cw.writeBytes, maxPendingBytes)
|
||||
}
|
||||
t.Logf("total writes: %d", cw.writes)
|
||||
t.Logf("total write bytes: %d (of %d)", cw.writeBytes, n)
|
||||
|
Loading…
x
Reference in New Issue
Block a user