Skip to content

Commit

Permalink
Fix panic in TestGetLocalHttpResponse (#1317)
Browse files Browse the repository at this point in the history
  • Loading branch information
rfay committed Dec 8, 2018
1 parent bbf4067 commit f3b604d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/testcommon/testcommon.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ func EnsureLocalHTTPContent(t *testing.T, rawurl string, expectedContent string,
body, resp, err := GetLocalHTTPResponse(t, rawurl, httpTimeout)
// We see intermittent php-fpm SIGBUS failures, only on macOS.
// That results in a 502. If we get a 502 on macOS, try again.
if resp.StatusCode == 502 && runtime.GOOS == "darwin" {
if runtime.GOOS == "darwin" && resp != nil && resp.StatusCode == 502 {
t.Log("Received 502 error on macOS, retrying GetLocalHTTPResponse")
time.Sleep(time.Second)
body, resp, err = GetLocalHTTPResponse(t, rawurl, httpTimeout)
Expand Down

0 comments on commit f3b604d

Please sign in to comment.