mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Don't log test initial test daemon ping failures
This is just noise due to timing. I picked `> 2` just based on logs from tests I've seen there's always 1 or 2. Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This commit is contained in:
parent
c7d1908d90
commit
15675e28f1
1 changed files with 8 additions and 3 deletions
|
@ -311,7 +311,7 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
|
|||
defer cancel()
|
||||
|
||||
// make sure daemon is ready to receive requests
|
||||
for {
|
||||
for i := 0; ; i++ {
|
||||
d.log.Logf("[%s] waiting for daemon to start", d.id)
|
||||
|
||||
select {
|
||||
|
@ -325,9 +325,14 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
|
|||
|
||||
resp, err := client.Do(req.WithContext(rctx))
|
||||
if err != nil {
|
||||
if i > 2 { // don't log the first couple, this ends up just being noise
|
||||
d.log.Logf("[%s] error pinging daemon on start: %v", d.id, err)
|
||||
}
|
||||
|
||||
time.Sleep(500 * time.Millisecond)
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
case <-time.After(500 * time.Microsecond):
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue