You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It only fails when TestCancelRequestWithChannelBeforeDo and TestTransportCloseResponseBody are run consecutively, but not systematically.
Only TestCancelRequestWithChannelBeforeDo:
cpu% go test -v -run TestCancelRequestWithChannelBeforeDo
=== RUN TestCancelRequestWithChannelBeforeDo
--- PASS: TestCancelRequestWithChannelBeforeDo (0.27s)
PASS
ok net/http 0.334s
Only TestTransportCloseResponseBody:
cpu% go test -v -run TestTransportCloseResponseBody
=== RUN TestTransportCloseResponseBody
--- PASS: TestTransportCloseResponseBody (0.34s)
PASS
ok net/http 0.421s
TestCancelRequestWithChannelBeforeDo and TestTransportCloseResponseBody:
cpu% go test -v -run '(TestCancelRequestWithChannelBeforeDo|TestTransportCloseResponseBody)'
=== RUN TestCancelRequestWithChannelBeforeDo
--- PASS: TestCancelRequestWithChannelBeforeDo (0.00s)
=== RUN TestTransportCloseResponseBody
--- FAIL: TestTransportCloseResponseBody (0.12s)
transport_test.go:1587: EOF
FAIL
exit status: 'http.test 124221: 1'
FAIL net/http 0.197s
I've confirmed with printf debugging that this is due to the request from TestTransportCloseResponseBody being received by the handler set up in TestCancelRequestWithChannelBeforeDo. I haven't yet figured out why this happens, since it appears they should be on different ports.
Correction: httptest.NewServer binds to :0, so the port is irrelevant. But the handler from the first test still sees the request from the second, even though the second test issues the request only after httptest.Server.Close in the first test returns.
In CL 11601, TestTransportCloseResponseBody is failing on Plan 9:
See https://storage.googleapis.com/go-build-log/10feb7f2/plan9-386_6337f8ae.log.
It only fails when TestCancelRequestWithChannelBeforeDo and TestTransportCloseResponseBody are run consecutively, but not systematically.
Only TestCancelRequestWithChannelBeforeDo:
Only TestTransportCloseResponseBody:
TestCancelRequestWithChannelBeforeDo and TestTransportCloseResponseBody:
Here is the stack trace:
The text was updated successfully, but these errors were encountered: