Return more detailed error message on timeout in WaitForPort.
This commit is contained in:
parent
e1c3ec8cd0
commit
b67bb030c3
1 changed files with 1 additions and 1 deletions
|
@ -39,7 +39,7 @@ func WaitForPort(timeout time.Duration, port string) error {
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-stopTimer.C:
|
case <-stopTimer.C:
|
||||||
return fmt.Errorf("timeout")
|
return fmt.Errorf("no server started listening on port %s after timeout %d", port, timeout)
|
||||||
case <-t.C:
|
case <-t.C:
|
||||||
if err := portIsReady(port); err != nil {
|
if err := portIsReady(port); err != nil {
|
||||||
_, _ = fmt.Fprintf(os.Stderr, "waiting for port: %s\n", err)
|
_, _ = fmt.Fprintf(os.Stderr, "waiting for port: %s\n", err)
|
||||||
|
|
Loading…
Reference in a new issue