Skip to content

Commit

Permalink
Increase delay of delayOnceReader to reduce flakyness of TestAttach
Browse files Browse the repository at this point in the history
Signed-off-by: apostasie <[email protected]>
  • Loading branch information
apostasie committed Sep 26, 2024
1 parent 40edc49 commit a1224a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/testutil/testutil_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func NewDelayOnceReader(wrapped io.Reader) io.Reader {

func (r *delayOnceReader) Read(p []byte) (int, error) {
// FIXME: this is obviously not exact science. At 1 second, it will fail regularly on the CI under load.
r.once.Do(func() { time.Sleep(2 * time.Second) })
r.once.Do(func() { time.Sleep(5 * time.Second) })
n, err := r.wrapped.Read(p)
if errors.Is(err, io.EOF) {
time.Sleep(time.Second)
Expand Down

0 comments on commit a1224a3

Please sign in to comment.