()
| 632 | } |
| 633 | |
| 634 | func (d *dockerRunnable) WaitReady() (err error) { |
| 635 | if !d.IsRunning() { |
| 636 | return errors.Newf("service %s is stopped", d.Name()) |
| 637 | } |
| 638 | |
| 639 | for d.waitBackoffReady.Reset(); d.waitBackoffReady.Ongoing(); { |
| 640 | err = d.Ready() |
| 641 | if err == nil { |
| 642 | return nil |
| 643 | } |
| 644 | |
| 645 | d.waitBackoffReady.Wait() |
| 646 | } |
| 647 | return errors.Wrapf(err, "the service %s is not ready", d.Name()) |
| 648 | } |
| 649 | |
| 650 | // Exec runs the provided command against the docker container specified by this |
| 651 | // service. |