-
Notifications
You must be signed in to change notification settings - Fork 182
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
Stop all pools when shutting down. #488
Conversation
@linkdd - thanks for the PR. Could you please run this command in your environment? The command assumes that Riak is running on The test suite locks up when I run it. Command: RIAK_TEST_HOST=localhost RIAK_TEST_PB_PORT=8087 RUN_CLIENT=1 python -m unittest --verbose riak.tests.test_client Output I get: $ RIAK_TEST_HOST=localhost RIAK_TEST_PB_PORT=8087 RUN_CLIENT=1 python -m unittest --verbose riak.tests.test_client
test_can_set_tcp_keepalive (riak.tests.test_client.ClientTests) ... ok
test_multiget_bucket (riak.tests.test_client.ClientTests) ... ok
test_multiget_errors (riak.tests.test_client.ClientTests) ... ok
test_multiget_notfounds (riak.tests.test_client.ClientTests) ... ok
test_multiget_pool_size (riak.tests.test_client.ClientTests) ... ok
test_multiput_errors (riak.tests.test_client.ClientTests) ... ok
test_multiput_pool_options (riak.tests.test_client.ClientTests) ... ok
test_multiput_pool_size (riak.tests.test_client.ClientTests) ... ok
test_pool_close (riak.tests.test_client.ClientTests) ... skipped 'RUN_POOL is 0'
test_request_retries (riak.tests.test_client.ClientTests) ... ok
test_request_retries_configurable (riak.tests.test_client.ClientTests) ... ok
test_timeout_validation (riak.tests.test_client.ClientTests) ... ok
test_uses_client_id_if_given (riak.tests.test_client.ClientTests) ... ok
----------------------------------------------------------------------
Ran 13 tests in 0.054s
OK (skipped=1)
^C^C^C^C^Z
[1]+ Stopped RIAK_TEST_PB_PORT=8087 RUN_CLIENT=1 python -m unittest --verbose riak.tests.test_client
lbakken@brahms ~/Projects/basho/riak-python-client (fixes/lrb/stop-pools-gh-449 *=)
$ kill -9 %1
[1]+ Killed RIAK_TEST_PB_PORT=8087 RUN_CLIENT=1 python -m unittest --verbose riak.tests.test_client
lbakken@brahms ~/Projects/basho/riak-python-client (fixes/lrb/stop-pools-gh-449 *=)
$ python --version
Python 2.7.11 |
I added debugging in 9fca06c You can see that the worker threads will never consider themselves stopped as they are all waiting on an item in the queue. Adding a timeout should resolve this, adding it now. |
@@ -43,7 +43,7 @@ test: setup test_normal test_security | |||
test_normal: | |||
@echo "Testing Riak Python Client (without security)" | |||
@$(RIAK_ADMIN) security disable | |||
@RIAK_TEST_PROTOCOL='pbc' RIAK_TEST_PB_PORT=8087 RUN_POOL=1 RUN_BTYPES=1 RUN_CLIENT=1 RUN_MAPREDUCE=1 RUN_KV=1 RUN_RESOLVE=1 RUN_YZ=1 RUN_DATATYPES=1 RUN_INDEXES=1 ./tox_runner.sh .. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lukebakken Are these now obsolete?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I added RUN_POOL
a commit or so ago just for kicks. No need to run them every time. And, they don't have anything to do with the multi-pools, anyway, they are tests of a the generic Pool
class that the TCP and HTTP connection pools use.
Incorporates #487