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

Tests fail with socket connection error #3

Open
rufuspollock opened this issue Oct 14, 2011 · 0 comments
Open

Tests fail with socket connection error #3

rufuspollock opened this issue Oct 14, 2011 · 0 comments

Comments

@rufuspollock
Copy link
Member

Tests fail with errors like:

test_database_contains (test_client.WebstoreClientTestCase) ... Exception in thread server:
Traceback (most recent call last):
  File "/usr/lib/python2.6/threading.py", line 532, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.6/threading.py", line 484, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/home/rgrp/src/webstore-client/test/test_client.py", line 19, in run_webstore
    app.run(port=6675)
  File "/home/rgrp/venv/webstore/lib/python2.6/site-packages/flask/app.py", line 553, in run
    return run_simple(host, port, self, **options)
  File "/home/rgrp/venv/webstore/lib/python2.6/site-packages/werkzeug/serving.py", line 614, in run_simple
    run_with_reloader(inner, extra_files, reloader_interval)
  File "/home/rgrp/venv/webstore/lib/python2.6/site-packages/werkzeug/serving.py", line 529, in run_with_reloader
    signal.signal(signal.SIGTERM, lambda *args: sys.exit(0))
ValueError: signal only works in main thread

ERROR
test_database_getitem (test_client.WebstoreClientTestCase) ... ERROR
test_database_table_listing (test_client.WebstoreClientTestCase) ... ERROR
test_table_add_row (test_client.WebstoreClientTestCase) ... ERROR
test_table_delete (test_client.WebstoreClientTestCase) ... ERROR
test_table_traverse_filter (test_client.WebstoreClientTestCase) ... ERROR
test_table_traverse_full (test_client.WebstoreClientTestCase) ... ERROR
test_table_traverse_limit (test_client.WebstoreClientTestCase) ... ERROR
test_table_update_row (test_client.WebstoreClientTestCase) ... ERROR

======================================================================
ERROR: test_database_contains (test_client.WebstoreClientTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/rgrp/src/webstore-client/test/test_client.py", line 38, in setUp
    self.table.writerows(FIXTURES)
  File "/home/rgrp/src/webstore-client/webstore/client/__init__.py", line 370, in writerows
    return self._request("POST", query, rows)
  File "/home/rgrp/src/webstore-client/webstore/client/__init__.py", line 164, in _request
    response = self._raw_request(method, path, data, _headers)
  File "/home/rgrp/src/webstore-client/webstore/client/__init__.py", line 150, in _raw_request
    conn.request(method, path, data, _headers)
  File "/usr/lib/python2.6/httplib.py", line 914, in request
    self._send_request(method, url, body, headers)
  File "/usr/lib/python2.6/httplib.py", line 951, in _send_request
    self.endheaders()
  File "/usr/lib/python2.6/httplib.py", line 908, in endheaders
    self._send_output()
  File "/usr/lib/python2.6/httplib.py", line 780, in _send_output
    self.send(msg)
  File "/usr/lib/python2.6/httplib.py", line 739, in send
    self.connect()
  File "/usr/lib/python2.6/httplib.py", line 720, in connect
    self.timeout)
  File "/usr/lib/python2.6/socket.py", line 547, in create_connection
    for res in getaddrinfo(host, port, 0, SOCK_STREAM):
gaierror: [Errno -2] Name or service not known
-------------------- >> begin captured logging << --------------------
werkzeug: INFO:  * Running on http://127.0.0.1:6675/
rufuspollock added a commit that referenced this issue Nov 4, 2011
…fixes to get tests closer to working.

* Tests now pass if you explicitly run against a separate running webstore. However does not work with its local threaded server.
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

1 participant