Skip to content

Commit

Permalink
Add ReadTimeout for e2e tests, otherwise this can hang forever.
Browse files Browse the repository at this point in the history
  • Loading branch information
markmandel committed Sep 20, 2018
1 parent 0ecca13 commit 548f085
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/e2e/framework/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@ func PingGameServer(msg, address string) (reply string, err error) {
return "", errors.Wrapf(err, "Could not write message %s", msg)
}
b := make([]byte, 1024)

conn.SetReadDeadline(time.Now().Add(30 * time.Second))
n, err := conn.Read(b)
if err != nil {
return "", err
Expand Down

0 comments on commit 548f085

Please sign in to comment.