From 4042a8505cdac94dba5718b6a89f82d478fef0d6 Mon Sep 17 00:00:00 2001 From: Wang Date: Thu, 3 Feb 2022 07:59:08 +0800 Subject: fix(core): use selectors to poll connections instead of raw select in threading,gevent,eventlet (#656) Co-authored-by: lawrentwang Solve the select limitation on a maximum file handler value and dynamic choose the best poller in the system. --- kazoo/tests/test_threading_handler.py | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'kazoo/tests/test_threading_handler.py') diff --git a/kazoo/tests/test_threading_handler.py b/kazoo/tests/test_threading_handler.py index 4376957..dbdccd7 100644 --- a/kazoo/tests/test_threading_handler.py +++ b/kazoo/tests/test_threading_handler.py @@ -45,10 +45,6 @@ class TestThreadingHandler(unittest.TestCase): assert h._running is False def test_huge_file_descriptor(self): - from kazoo.handlers.threading import _HAS_EPOLL - - if not _HAS_EPOLL: - self.skipTest('only run on systems with epoll()') import resource import socket from kazoo.handlers.utils import create_tcp_socket @@ -65,11 +61,10 @@ class TestThreadingHandler(unittest.TestCase): socks.append(sock) h = self._makeOne() h.start() - h.select(socks, [], []) - with pytest.raises(ValueError): - h._select(socks, [], []) - h._epoll_select(socks, [], []) + h.select(socks, [], [], 0) h.stop() + for sock in socks: + sock.close() class TestThreadingAsync(unittest.TestCase): -- cgit v1.2.1