Closed avats-dev closed 4 years ago
Hey! I was able to reproduce this error. The main cause of the error is low request timeout in the test
https://github.com/creativecommons/cc-link-checker/blob/master/link_checker/tests/test_utils.py#L395
The reason that it was passing on CI server is because the server have high bandwidth and they can complete the request in 1 sec while the local computer request fails out in that time.
A plausible fix is to change the timeout
parameter from 1 to 3.
Hope this helps!
It should be a quick fix, do let me know if you want to work on the issue.
Thanks @bhumijgupta for explaining this, it was bugging me. And yes I would like to work on this. 👍
Hey @bhumijgupta , I'm thinking of changing to timeout=2
as this should be enough. I tested for both 2
and 3
and it was same. Previously my connection was too slow so I couldn't get it to pass for 1
but now when I'm checking , it's also passing for 1
.
Description
Unit test
test_memoize_result
failing when unit tests are run on master.Reproduction
git clone https://github.com/creativecommons/cc-link-checker.git
cd cc-link-checker
pipenv install --dev
pipenv run pytest -v
Expectation
test_memoize_result
should pass along with all other unit tests.Screenshots
Verbose test
Failure description
Environment
Resolution