mirror of https://github.com/docker/compose.git
Merge pull request #471 from docker/fix-run-timeout
Put 40 seconds for timeout instead of 20
This commit is contained in:
commit
4286458300
|
@ -226,7 +226,7 @@ func checkIfUnknownCommandExistInDefaultContext(err error, currentContext string
|
|||
|
||||
func newSigContext() (context.Context, func()) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
s := make(chan os.Signal)
|
||||
s := make(chan os.Signal, 1)
|
||||
signal.Notify(s, syscall.SIGTERM, syscall.SIGINT)
|
||||
go func() {
|
||||
<-s
|
||||
|
|
|
@ -62,7 +62,7 @@ func Exec() {
|
|||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
|
||||
signals := make(chan os.Signal)
|
||||
signals := make(chan os.Signal, 1)
|
||||
childExit := make(chan bool)
|
||||
signal.Notify(signals) // catch all signals
|
||||
go func() {
|
||||
|
|
|
@ -299,7 +299,7 @@ func TestLegacy(t *testing.T) {
|
|||
t.Run("local run", func(t *testing.T) {
|
||||
t.Parallel()
|
||||
cmd := c.NewDockerCmd("run", "--rm", "hello-world")
|
||||
cmd.Timeout = 20 * time.Second
|
||||
cmd.Timeout = 40 * time.Second
|
||||
res := icmd.RunCmd(cmd)
|
||||
res.Assert(t, icmd.Expected{Out: "Hello from Docker!"})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue