Skip to content
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

test failures on master #454

Closed
kevinburke opened this issue Aug 25, 2014 · 8 comments
Closed

test failures on master #454

kevinburke opened this issue Aug 25, 2014 · 8 comments

Comments

@kevinburke
Copy link
Contributor

kevinburke commented Aug 25, 2014

Running on a Mac, 10.9, with the following command

while true; do make test ; if [[ $? -gt 0 ]]; then break; fi; done

Some of the failures are below.

ProtocolError not raised (got this one twice):

def test_source_address_error(self):
    for addr in INVALID_SOURCE_ADDRESSES:
        pool = HTTPConnectionPool(self.host, self.port,
                source_address=addr, retries=False)
        self.assertRaises(ProtocolError,
                pool.request, 'GET', '/source_address')

Not sure what r.data actually was:

FAIL: test_source_address (test.with_dummyserver.test_connectionpool.TestConnectionPool)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/kevin/code/urllib3/test/with_dummyserver/test_connectionpool.py", line 598, in test_source_address
    assert r.data == b(addr[0])
AssertionError:

Connection failed:

ERROR: test_connection_read_timeout (test.with_dummyserver.test_socketlevel.TestSocketClosing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/kevin/code/urllib3/test/with_dummyserver/test_socketlevel.py", line 136, in test_connection_read_timeout
    self.assertRaises(ReadTimeoutError, pool.request, 'GET', '/')
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/case.py", line 473, in assertRaises
    callableObj(*args, **kwargs)
  File "/Users/kevin/code/urllib3/urllib3/request.py", line 68, in request
    **urlopen_kw)
  File "/Users/kevin/code/urllib3/urllib3/request.py", line 81, in request_encode_url
    return self.urlopen(method, url, **urlopen_kw)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 559, in urlopen
    _pool=self, _stacktrace=stacktrace)
  File "/Users/kevin/code/urllib3/urllib3/util/retry.py", line 223, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 516, in urlopen
    body=body, headers=headers)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 308, in _make_request
    conn.request(method, url, **httplib_request_kw)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 995, in request
    self._send_request(method, url, body, headers)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 1029, in _send_request
    self.endheaders(body)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 991, in endheaders
    self._send_output(message_body)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 844, in _send_output
    self.send(msg)
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/httplib.py", line 806, in send
    self.connect()
  File "/Users/kevin/code/urllib3/urllib3/connection.py", line 146, in connect
    conn = self._new_conn()
  File "/Users/kevin/code/urllib3/urllib3/connection.py", line 125, in _new_conn
    (self.host, self.port), self.timeout, **extra_kw)
  File "/Users/kevin/code/urllib3/urllib3/util/connection.py", line 87, in create_connection
    raise err
ProtocolError: ('Connection aborted.', error(61, 'Connection refused'))
-------------------- >> begin captured logging << --------------------
urllib3.util.retry: DEBUG: Converted retries value: False -> Retry(total=False, connect=None, read=None, redirect=0)
urllib3.connectionpool: INFO: Starting new HTTP connection (1): localhost

Another one

======================================================================
ERROR: test_timeout_errors_cause_retries (test.with_dummyserver.test_socketlevel.TestSocketClosing)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/kevin/code/urllib3/test/with_dummyserver/test_socketlevel.py", line 175, in test_timeout_errors_cause_retries
    response = pool.request('GET', '/', retries=1)
  File "/Users/kevin/code/urllib3/urllib3/request.py", line 68, in request
    **urlopen_kw)
  File "/Users/kevin/code/urllib3/urllib3/request.py", line 81, in request_encode_url
    return self.urlopen(method, url, **urlopen_kw)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 579, in urlopen
    release_conn=release_conn, **response_kw)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 559, in urlopen
    _pool=self, _stacktrace=stacktrace)
  File "/Users/kevin/code/urllib3/urllib3/util/retry.py", line 265, in increment
    raise MaxRetryError(_pool, url, error)
MaxRetryError: HTTPConnectionPool(host='localhost', port=50350): Max retries exceeded with url: / (Caused by ReadTimeoutError("HTTPConnectionPool(host='localhost', port=50350): Read timed out. (read timeout=0.001)",))

The server from the same error

Exception in thread Thread-22:
Traceback (most recent call last):
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
    self.run()
  File "/Users/kevin/code/urllib3/dummyserver/server.py", line 70, in run
    self.server = self._start_server()
  File "/Users/kevin/code/urllib3/dummyserver/server.py", line 66, in _start_server
    self.socket_handler(sock)
  File "/Users/kevin/code/urllib3/test/with_dummyserver/test_socketlevel.py", line 145, in socket_handler
    sock = listener.accept()[0]
  File "/usr/local/Cellar/python/2.7.8_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/socket.py", line 202, in accept
    sock, addr = self._sock.accept()
timeout: timed out

This is the result of running the tests maybe 100 times, while connected to a stable wifi network. Occasionally I also see No handlers could be found for logger "tornado.access".

@shazow
Copy link
Member

shazow commented Aug 25, 2014

This is with tornado==3.1.1?

@kevinburke
Copy link
Contributor Author

Yep tornado 3.1.1, cpython 2.7.8

@shazow
Copy link
Member

shazow commented Aug 25, 2014

I'm all for fixing flakey tests, but I usually don't bother dropping what I'm doing unless it's happening like >10-20% of the time. I definitely welcome any effort here though.

@shazow
Copy link
Member

shazow commented Sep 6, 2014

@kevinburke Is this still an issue?

@kevinburke
Copy link
Contributor Author

Here are some more

On Travis test_ssl_correct_system_time raised the following warning (and failed) 2 out of 3 times on Python 3.4:

{message : ResourceWarning("unclosed <ssl.SSLSocket fd=64, family=AddressFamily.AF_INET6, type=SocketType.SOCK_STREAM, proto=6, laddr=('::1', 41582, 0, 0), raddr=('::1', 59505, 0, 0)>",), category : 'ResourceWarning', filename : '/opt/python/3.4.1/lib/python3.4/socket.py', lineno : 266, line : None}

Locally this proxy test fails 3 out of 10 times or so:

ERROR: test_retries (test.with_dummyserver.test_socketlevel.TestProxyManager)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/kevin/code/urllib3/test/with_dummyserver/test_socketlevel.py", line 400, in test_retries
    assert_same_host=False, retries=False)
  File "/usr/local/opt/pyenv/versions/3.4.2/lib/python3.4/unittest/case.py", line 704, in assertRaises
    return context.handle('assertRaises', callableObj, args, kwargs)
  File "/usr/local/opt/pyenv/versions/3.4.2/lib/python3.4/unittest/case.py", line 162, in handle
    callable_obj(*args, **kwargs)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 561, in urlopen
    _pool=self, _stacktrace=stacktrace)
  File "/Users/kevin/code/urllib3/urllib3/util/retry.py", line 222, in increment
    raise six.reraise(type(error), error, _stacktrace)
  File "/Users/kevin/code/urllib3/urllib3/packages/six.py", line 309, in reraise
    raise value.with_traceback(tb)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 518, in urlopen
    body=body, headers=headers)
  File "/Users/kevin/code/urllib3/urllib3/connectionpool.py", line 355, in _make_request
    httplib_response = conn.getresponse()
  File "/usr/local/opt/pyenv/versions/3.4.2/lib/python3.4/http/client.py", line 1172, in getresponse
    response.begin()
  File "/usr/local/opt/pyenv/versions/3.4.2/lib/python3.4/http/client.py", line 351, in begin
    version, status, reason = self._read_status()
  File "/usr/local/opt/pyenv/versions/3.4.2/lib/python3.4/http/client.py", line 321, in _read_status
    raise BadStatusLine(line)
nose.proxy.ProtocolError: ('Connection aborted.', BadStatusLine("''",))

@idella
Copy link

idella commented Dec 11, 2014

confirmed.
https://bugs.gentoo.org/show_bug.cgi?id=532104

which has this second; test_ssl_wrong_system_time. Appears some form of regression under py3.4?

awaiting a fix.

@shazow
Copy link
Member

shazow commented Dec 11, 2014

❤️ Gentoo; 💩 this bug. Hmm.

@sethmlarson
Copy link
Member

This issue is probably outdated. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants