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.

Author martin.panter
Recipients martin.panter
Date 2015-12-14.09:00:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450083626.81.0.0429805941711.issue25859@psf.upfronthosting.co.za>
In-reply-to
Content
The AMD64 Debian root buildbot and the x86 Gentoo Installed with X buildbot have been persistently failing test_nntplib for a while, and I can also reproduce it locally when “test -unetwork” is enabled. Six test cases fail. There is a pause before test_starttls() fails, then all the others fail immediately:

test_newgroups (test.test_nntplib.NetworkedNNTPTests) ... ok
test_over (test.test_nntplib.NetworkedNNTPTests) ... ok
test_starttls (test.test_nntplib.NetworkedNNTPTests) ... ERROR
test_unknown_command (test.test_nntplib.NetworkedNNTPTests) ... ERROR
test_welcome (test.test_nntplib.NetworkedNNTPTests) ... ok
test_with_statement (test.test_nntplib.NetworkedNNTPTests) ... ok
test_xhdr (test.test_nntplib.NetworkedNNTPTests) ... ERROR
test_xover (test.test_nntplib.NetworkedNNTPTests) ... ERROR
test_zlogin (test.test_nntplib.NetworkedNNTPTests) ... ERROR
test_zzquit (test.test_nntplib.NetworkedNNTPTests) ... ERROR
test_article_head_body (test.test_nntplib.NetworkedNNTP_SSLTests) ... ok
test_capabilities (test.test_nntplib.NetworkedNNTP_SSLTests) ... ok

Traceback from first failure:

======================================================================
ERROR: test_starttls (test.test_nntplib.NetworkedNNTPTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/media/disk/home/proj/python/cpython/Lib/test/test_nntplib.py", line 252, in wrapped
    meth(self)
  File "/media/disk/home/proj/python/cpython/Lib/test/test_nntplib.py", line 210, in test_starttls
    self.server.starttls()
  File "/media/disk/home/proj/python/cpython/Lib/nntplib.py", line 1014, in starttls
    self.getcapabilities()
  File "/media/disk/home/proj/python/cpython/Lib/nntplib.py", line 390, in getcapabilities
    resp, caps = self.capabilities()
  File "/media/disk/home/proj/python/cpython/Lib/nntplib.py", line 558, in capabilities
    resp, lines = self._longcmdstring("CAPABILITIES")
  File "/media/disk/home/proj/python/cpython/Lib/nntplib.py", line 525, in _longcmdstring
    resp, list = self._getlongresp(file)
  File "/media/disk/home/proj/python/cpython/Lib/nntplib.py", line 476, in _getlongresp
    resp = self._getresp()
  File "/media/disk/home/proj/python/cpython/Lib/nntplib.py", line 449, in _getresp
    resp = self._getline()
  File "/media/disk/home/proj/python/cpython/Lib/nntplib.py", line 437, in _getline
    if not line: raise EOFError
EOFError

It seems like as soon as the TLS connection is successfully set up, the server (news.trigofacile.com) shuts down the connection.

Would it be appropriate to change this test so that instead of connecting to a remote server, we connect to a local server running in a background thread? I attach a Python script that runs a minimal server with hardcoded responses allowing test_starttls() to pass. Perhaps we could use this for test_starttls(). Maybe even extend it to other remote server tests as well.
History
Date User Action Args
2015-12-14 09:00:26martin.pantersetrecipients: + martin.panter
2015-12-14 09:00:26martin.pantersetmessageid: <1450083626.81.0.0429805941711.issue25859@psf.upfronthosting.co.za>
2015-12-14 09:00:26martin.panterlinkissue25859 messages
2015-12-14 09:00:25martin.pantercreate