Skip to content

Tests: Flakyness with ForkProcess #406

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

Closed
amotl opened this issue Mar 29, 2021 · 2 comments
Closed

Tests: Flakyness with ForkProcess #406

amotl opened this issue Mar 29, 2021 · 2 comments

Comments

@amotl
Copy link
Member

amotl commented Mar 29, 2021

Hi there,

I just wanted to report about a flakyness I observed when running tests on #401. Maybe it is related to the recent patch from #405.

Process ForkProcess-5:
 test_default_schema (crate.client.test_http.TestDefaultSchemaHeader)Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
    self.run()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/test_http.py", line 523, in run_server
    cls(server_address, request_handler_cls).serve_forever()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/socketserver.py", line 456, in __init__
    self.server_bind()
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/http/server.py", line 136, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/socketserver.py", line 470, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use


Error in test test_default_schema (crate.client.test_http.TestDefaultSchemaHeader)
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/unittest/case.py", line 59, in testPartExecutor
    yield
  File "/opt/hostedtoolcache/Python/3.6.13/x64/lib/python3.6/unittest/case.py", line 605, in run
    testMethod()
  File "/home/runner/work/crate-python/crate-python/src/crate/client/test_http.py", line 590, in test_default_schema
    self.client.sql('SELECT 1')
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 396, in sql
    content = self._json_request('POST', self.path, data=data)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 522, in _json_request
    response = self._request(method, path, data=data)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 513, in _request
    self._drop_server(next_server, ex_message)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 592, in _drop_server
    "exception from last server: %s") % message)
crate.client.exceptions.ConnectionError: No more Servers available, exception from last server: HTTPConnectionPool(host='127.0.0.1', port=65534): Read timed out. (read timeout=1)

With kind regards,
Andreas.

@amotl
Copy link
Member Author

amotl commented Apr 8, 2021

Same thing again at https://github.com/crate/crate-python/runs/2297989214#step:6:39.

New thread(s): [<Thread(0, started 139899985118976)>]
 test_no_params (crate.client.test_http.ParamsTest)
 test_params (crate.client.test_http.ParamsTest)
 test_invalid_server_version (crate.client.test_connection.ConnectionTest)
 test_lowest_server_version (crate.client.test_connection.ConnectionTest)
 test_with_is_supported (crate.client.test_connection.ConnectionTest)
Exception in thread 0:
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/threading.py", line 870, in run
    self._target(*self._args, **self._kwargs)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/test_http.py", line 328, in _run
    num_servers = len(self.client._active_servers) + \
AttributeError: 'ThreadSafeHttpClientTest' object has no attribute 'client'
 test_no_retry_on_read_timeout (crate.client.test_http.RetryOnTimeoutServerTest)
 test_open_client (crate.client.test_http.RequestsCaBundleTest)
 test_remove_certs_for_non_https (crate.client.test_http.RequestsCaBundleTest)
 test_username (crate.client.test_http.TestUsernameSentAsHeader)
 test_default_schema (crate.client.test_http.TestDefaultSchemaHeader)Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
    self.run()
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/test_http.py", line 523, in run_server
    cls(server_address, request_handler_cls).serve_forever()
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/http/server.py", line 138, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
Process ForkProcess-5:


Error in test test_default_schema (crate.client.test_http.TestDefaultSchemaHeader)
Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
    yield
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/unittest/case.py", line 676, in run
    self._callTestMethod(testMethod)
  File "/opt/hostedtoolcache/Python/3.8.8/x64/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
    method()
  File "/home/runner/work/crate-python/crate-python/src/crate/client/test_http.py", line 590, in test_default_schema
    self.client.sql('SELECT 1')
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 396, in sql
    content = self._json_request('POST', self.path, data=data)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 522, in _json_request
    response = self._request(method, path, data=data)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 513, in _request
    self._drop_server(next_server, ex_message)
  File "/home/runner/work/crate-python/crate-python/src/crate/client/http.py", line 590, in _drop_server
    raise ConnectionError(
crate.client.exceptions.ConnectionError: No more Servers available, exception from last server: HTTPConnectionPool(host='127.0.0.1', port=65534): Read timed out. (read timeout=1)

@amotl
Copy link
Member Author

amotl commented May 18, 2022

The problems referenced above have not been observable lately, so I am closing this.

@amotl amotl closed this as completed May 18, 2022
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