Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestAnchorExternalHrefIPTimeout is flaky #148

Closed
QuLogic opened this issue Aug 4, 2020 · 2 comments · Fixed by #158
Closed

TestAnchorExternalHrefIPTimeout is flaky #148

QuLogic opened this issue Aug 4, 2020 · 2 comments · Fixed by #158
Assignees
Labels

Comments

@QuLogic
Copy link
Contributor

QuLogic commented Aug 4, 2020

Describe the bug

We're trying to rebuild with Go 1.15, but I keep running into issues with TestAnchorExternalHrefIPTimeout.

To Reproduce

  1. go test github.com/wjdp/htmltest/htmltest

Expected behaviour

Tests work.

Actual behaviour

This randomly fails. Here are the last four attempts. As you can see, it fails on different systems every time.

The failure is always the same, though:

github.com/wjdp/htmltest/htmltest
<<<<<<<<<<<<<<<<<<<<<<<<
testDocument on ip_timeout.html
fresh --- ip_timeout.html --> http://5.6.7.8
hitting --- ip_timeout.html --> http://5.6.7.8
Get "http://5.6.7.8": dial tcp 5.6.7.8:80: i/o timeout (Client.Timeout exceeded while awaiting headers) --- ip_timeout.html --> http://5.6.7.8
>>>>>>>>>>>>>>>>>>>>>>>>
--- FAIL: TestAnchorExternalHrefIPTimeout (1.00s)
    test_helpers_test.go:23: expected issue request exceeded our ExternalTimeout count 1 != 0
FAIL

It seems to be timing out, but raising a slightly different error.

Versions

  • OS: Fedora Rawhide
  • htmltest: 0.12.1
@QuLogic QuLogic added the bug label Aug 4, 2020
@wjdp
Copy link
Owner

wjdp commented Jan 14, 2021

Hey @QuLogic, sorry for the delay!

I can't see anything obvious here. The expected issue is triggered by Client.Timeout being present in the underlying HTTP error, which in the log it is??

We should be running against 1.15 soon, am doing so locally already, so will see if this is reproduced.

@wjdp
Copy link
Owner

wjdp commented Jan 15, 2021

Aaand while playing around with Go 1.15 on GitHub actions I see this on an Ubuntu 10.04 runner

=== RUN   TestAnchorExternalHrefIPTimeout
<<<<<<<<<<<<<<<<<<<<<<<<
testDocument on ip_timeout.html
fresh --- ip_timeout.html --> http://5.6.7.8
hitting --- ip_timeout.html --> http://5.6.7.8
Get "http://5.6.7.8": dial tcp 5.6.7.8:80: i/o timeout (Client.Timeout exceeded while awaiting headers) --- ip_timeout.html --> http://5.6.7.8
>>>>>>>>>>>>>>>>>>>>>>>>

@wjdp wjdp self-assigned this Jan 15, 2021
wjdp added a commit that referenced this issue Jan 15, 2021
Sometimes the error message from http.Client is different in Go 1.15 for client timeouts.
The messages causing issues contain "dial tcp" which was caught before Client.Timeout.

This fix just moves the handler for "Client.Timeout" above "dial tcp".

Will close #148
@wjdp wjdp closed this as completed in #158 Jan 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants