python-zk / kazoo

Kazoo is a high-level Python library that makes it easier to use Apache Zookeeper.
https://kazoo.readthedocs.io
Apache License 2.0
1.3k stars 387 forks source link

Exercise more tests under gevent/eventlet #591

Open ztzg opened 4 years ago

ztzg commented 4 years ago

The number of tests run under eventlet and gevent (in addition to the standard threading) is limited to a few classes:

TestEventletClient(test_client.TestClient)
TestEventletSemaphore(test_lock.TestSemaphore)
TestEventletLock(test_lock.KazooLockTests)

TestGeventClient(test_client.TestClient)

Extending the coverage is not a simple matter of adding more subclasses, as some tests (e.g., in test_connection.TestConnectionHandler) rely on primitives such as threading.Event and time.sleep. These first have to be replaced by the appropriate handler-specific implementations.

This ticket is about doing both.

See https://github.com/python-zk/kazoo/pull/588#discussion_r382993141 for the discussion which led to this.