This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: test_urllib2net.test_http_basic() timeout after 15 min on
Type: Stage: resolved
Components: Versions:
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: florin.papa, martin.panter, vstinner, zach.ware
Priority: normal Keywords:

Created on 2016-04-14 14:53 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (5)
msg263411 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-04-14 14:53
Timeout seen on "x86-64 Ubuntu 15.10 Skylake CPU 3.5" buildbot:

[215/398] test_urllib2net
Timeout (0:15:00)!
Thread 0x00007f71354be700 (most recent call first):
  File "/home/buildbot/buildarea/", line 575 in readinto
  File "/home/buildbot/buildarea/", line 258 in _read_status
  File "/home/buildbot/buildarea/", line 297 in begin
  File "/home/buildbot/buildarea/", line 1197 in getresponse
  File "/home/buildbot/buildarea/", line 1246 in do_open
  File "/home/buildbot/buildarea/", line 1271 in http_open
  File "/home/buildbot/buildarea/", line 443 in _call_chain
  File "/home/buildbot/buildarea/", line 483 in _open
  File "/home/buildbot/buildarea/", line 465 in open
  File "/home/buildbot/buildarea/", line 162 in urlopen
  File "/home/buildbot/buildarea/", line 19 in _retry_thrice
  File "/home/buildbot/buildarea/", line 27 in wrapped
  File "/home/buildbot/buildarea/", line 255 in test_http_basic
  File "/home/buildbot/buildarea/", line 600 in run
  File "/home/buildbot/buildarea/", line 648 in __call__
  File "/home/buildbot/buildarea/", line 122 in run
  File "/home/buildbot/buildarea/", line 84 in __call__
  File "/home/buildbot/buildarea/", line 122 in run
  File "/home/buildbot/buildarea/", line 84 in __call__
  File "/home/buildbot/buildarea/", line 122 in run
  File "/home/buildbot/buildarea/", line 84 in __call__
  File "/home/buildbot/buildarea/", line 176 in run
  File "/home/buildbot/buildarea/", line 1800 in _run_suite
  File "/home/buildbot/buildarea/", line 1834 in run_unittest
  File "/home/buildbot/buildarea/", line 1305 in test_runner
  File "/home/buildbot/buildarea/", line 1306 in runtest_inner
  File "/home/buildbot/buildarea/", line 991 in runtest
  File "/home/buildbot/buildarea/", line 784 in main
  File "/home/buildbot/buildarea/", line 1592 in main_in_temp_cwd
  File "/home/buildbot/buildarea/", line 3 in <module>
  File "/home/buildbot/buildarea/", line 85 in _run_code
  File "/home/buildbot/buildarea/", line 184 in _run_module_as_main
msg263412 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-04-14 14:55
See also issue #21069 "test_fileno of test_urllibnet intermittently fails".
msg263413 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2016-04-14 14:57
It looks deliberate to test the HTTP query with *no* timeout. Sadly, it looks like it's ok that an HTTP query takes longer than 15 minutes!

Can't we mock the query to only test that the socket timeout is None? Move the test from test_urllib2net to test_urllib2.

class TimeoutTest(unittest.TestCase):
    def test_http_basic(self):
        url = ""
        with support.transient_internet(url, timeout=None):
            u = _urlopen_with_retry(url)
msg263448 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2016-04-15 05:06
By “mock the query”, do you mean swap out the socket for a pretend socket object? Another option would be to connect to a server on localhost running on the background, like I did for the fileno() problem.

Looks like this test_http_basic() was intended to verify that no timeout was being used by default.
msg297102 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-06-28 01:08
Buildbot failure not seen last months, so I just close the issue.
Date User Action Args
2022-04-11 14:58:29adminsetgithub: 70944
2017-06-28 01:08:07vstinnersetstatus: open -> closed
resolution: out of date
messages: + msg297102

stage: resolved
2016-04-15 05:06:02martin.pantersetmessages: + msg263448
2016-04-14 14:58:36zach.waresetnosy: + zach.ware, florin.papa
2016-04-14 14:57:01vstinnersetmessages: + msg263413
2016-04-14 14:55:13vstinnersetmessages: + msg263412
2016-04-14 14:53:12vstinnercreate