this reduces execution of TestInfoDiscoveryInvalidAdvertise from 11s to 0.2s
Signed-off-by: Alexander Morozov <lk4d4@docker.com>
| ... | ... |
@@ -233,6 +233,8 @@ func (d *Daemon) StartWithLogFile(out *os.File, providedArgs ...string) error {
|
| 233 | 233 |
return fmt.Errorf("[%s] error querying daemon for root directory: %v", d.id, err)
|
| 234 | 234 |
} |
| 235 | 235 |
return nil |
| 236 |
+ case <-d.wait: |
|
| 237 |
+ return fmt.Errorf("[%s] Daemon exited during startup", d.id)
|
|
| 236 | 238 |
} |
| 237 | 239 |
} |
| 238 | 240 |
} |
| ... | ... |
@@ -563,7 +563,7 @@ func (s *DockerDaemonSuite) TestDaemonExitOnFailure(c *check.C) {
|
| 563 | 563 |
//attempt to start daemon with incorrect flags (we know -b and --bip conflict) |
| 564 | 564 |
if err := s.d.Start("--bridge", "nosuchbridge", "--bip", "1.1.1.1"); err != nil {
|
| 565 | 565 |
//verify we got the right error |
| 566 |
- if !strings.Contains(err.Error(), "Daemon exited and never started") {
|
|
| 566 |
+ if !strings.Contains(err.Error(), "Daemon exited") {
|
|
| 567 | 567 |
c.Fatalf("Expected daemon not to start, got %v", err)
|
| 568 | 568 |
} |
| 569 | 569 |
// look in the log and make sure we got the message that daemon is shutting down |