wjdp / htmltest

:white_check_mark: Test generated HTML for problems
MIT License
323 stars 54 forks source link

TestAnchorExternalHrefIPTimeout is flaky #148

Closed QuLogic closed 3 years ago

QuLogic commented 4 years ago

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

wjdp commented 3 years ago

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 commented 3 years ago

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
>>>>>>>>>>>>>>>>>>>>>>>>