* Handle gevent exception in gevent poller
Currently the gevent poller ignores exceptions raised by
`gevent.wait()`, which causes greenlets to be unkilable while waiting.
This change handles exceptions raised while waiting in the gevent
poller, cancels the gRPC call and propagates the error back to the
application.
Co-authored-by: Kostis Lolos <klolos@arrikto.com>
* Fix imports in header files
* Lint gevent tests
* Set grpc event type to GRPC_QUEUE_SHUTDOWN upon cancel error
To prevent `grpc_completion_queue_next()` to be called indefinitely when
the queue is shut down.
* Remove unnecessary `except *`
* Improve gevent tests
* Format code
* Remove unnecessary import
Co-authored-by: Kostis Lolos <klolos@arrikto.com>
When running test "./tools/run_tests/run_tests.py -l c++ -c dbg" in python3
environment, the following exception is observed.
./tools/run_tests/run_tests.py -l c++ -c dbg
PASSED: make [time=114.9sec, retries=0:0]
Omitting EPOLLEXCLUSIVE tests
2020-12-01 10:45:40,806 detected port server running version 21
2020-12-01 10:45:40,866 my port server is version 21
Traceback (most recent call last):
File "./tools/run_tests/run_tests.py", line 1919, in <module>
build_only=args.build_only)
File "./tools/run_tests/run_tests.py", line 1800, in _build_and_run
one_run = set(spec for language in languages
File "./tools/run_tests/run_tests.py", line 1801, in <genexpr>
for spec in language.test_specs()
File "./tools/run_tests/run_tests.py", line 383, in test_specs
for line in tests.split('\n'):
TypeError: a bytes-like object is required, not 'str'
Signed-off-by: dapeng-mi <clark_mdp@163.com>