فهرست منبع

Merge pull request #27271 from tonistiigi/fix-test-timeout

Reduce TestRunCommandWithTimeoutKilled flakiness
Alexander Morozov 8 سال پیش
والد
کامیت
61753568f5
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      pkg/integration/cmd/command_test.go

+ 3 - 3
pkg/integration/cmd/command_test.go

@@ -63,12 +63,12 @@ func TestRunCommandWithTimeoutKilled(t *testing.T) {
 		t.Skip("Needs porting to Windows")
 		t.Skip("Needs porting to Windows")
 	}
 	}
 
 
-	command := []string{"sh", "-c", "while true ; do echo 1 ; sleep .1 ; done"}
-	result := RunCmd(Cmd{Command: command, Timeout: 500 * time.Millisecond})
+	command := []string{"sh", "-c", "while true ; do echo 1 ; sleep .5 ; done"}
+	result := RunCmd(Cmd{Command: command, Timeout: 1250 * time.Millisecond})
 	result.Assert(t, Expected{Timeout: true})
 	result.Assert(t, Expected{Timeout: true})
 
 
 	ones := strings.Split(result.Stdout(), "\n")
 	ones := strings.Split(result.Stdout(), "\n")
-	assert.Equal(t, len(ones), 6)
+	assert.Equal(t, len(ones), 4)
 }
 }
 
 
 func TestRunCommandWithErrors(t *testing.T) {
 func TestRunCommandWithErrors(t *testing.T) {