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
transient_internet() (test_support): use socket.setdefaulttimeout() and test_robotparser failure #52820
Comments
Many tests of the Python test suite depends on the availability of websites, especially www.python.org. Python.org has some troubles since some days, and many buildbots failed (test_robotparser failure). I propose to use a default timeout of 60 seconds in transient_internet(), and then use transient_internet() in tests using the internet. Patches:
On Linux, you can use "iptables -I OUTPUT -p tcp --dport 80 -j DROP" (drop all outgoing packets) to simulate a network failure, and set the default timeout value of transient_internet() to 3 seconds. |
Oops, transient_internet.patch doesn't catch socket.error(errno.ETIMEDOUT, ...). Fixed by patch version 2. |
See also issue bpo-8499. |
Version 3 to prepare a patch for bpo-8499: don't change socket default timeout if the timeout argument is None. |
Improved again and committed in r84597 and r84599. Needs backporting. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: