mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
fix race in daemon test framework
Signed-off-by: Tibor Vass <teabee89@gmail.com>
This commit is contained in:
parent
affef9e785
commit
defe01daf8
1 changed files with 5 additions and 3 deletions
|
@ -90,14 +90,16 @@ func (d *Daemon) Start(arg ...string) error {
|
|||
return fmt.Errorf("Could not start daemon container: %v", err)
|
||||
}
|
||||
|
||||
d.wait = make(chan error)
|
||||
wait := make(chan error)
|
||||
|
||||
go func() {
|
||||
d.wait <- d.cmd.Wait()
|
||||
wait <- d.cmd.Wait()
|
||||
d.t.Log("exiting daemon")
|
||||
close(d.wait)
|
||||
close(wait)
|
||||
}()
|
||||
|
||||
d.wait = wait
|
||||
|
||||
tick := time.Tick(500 * time.Millisecond)
|
||||
// make sure daemon is ready to receive requests
|
||||
for {
|
||||
|
|
Loading…
Add table
Reference in a new issue