Merge pull request #5292 from laurazard/25-backport-flaky-tests

[25.0 backport] fix flaky `connhelper` tests
This commit is contained in:
Laura Brehm 2024-07-24 12:26:41 +01:00 committed by GitHub
commit 32b99dd6a3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -48,7 +48,7 @@ func TestEOFWithoutError(t *testing.T) {
func TestCloseRunningCommand(t *testing.T) {
cmd := "sh"
args := []string{"-c", "while true; sleep 1; done"}
args := []string{"-c", "while true; do sleep 1; done"}
done := make(chan struct{})
defer close(done)
@ -155,7 +155,7 @@ func (mockStdoutEOF) Close() error {
func TestCloseWhileWriting(t *testing.T) {
cmd := "sh"
args := []string{"-c", "while true; sleep 1; done"}
args := []string{"-c", "while true; do sleep 1; done"}
c, err := New(context.TODO(), cmd, args...)
assert.NilError(t, err)
@ -185,7 +185,7 @@ func TestCloseWhileWriting(t *testing.T) {
func TestCloseWhileReading(t *testing.T) {
cmd := "sh"
args := []string{"-c", "while true; sleep 1; done"}
args := []string{"-c", "while true; do sleep 1; done"}
c, err := New(context.TODO(), cmd, args...)
assert.NilError(t, err)