Skip to content

Commit

Permalink
remove gevent test for ThreadedClient
Browse files Browse the repository at this point in the history
  • Loading branch information
kentslaney committed May 31, 2024
1 parent 51e627f commit 1327704
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions tests/test_client_pool.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,34 +110,3 @@ def setUp(self):
def test_many_threads(self):
self.client_threads(self.misc)

# class ThreadedGreenletCompat(unittest.TestCase, ThreadedClientOps):
class ThreadedGreenletCompat(ThreadedClientOps):
"""
At the moment, threaded client pools do not support gevent since greenlets'
virtual address space for the stack overlaps. Support may be added in the
future though, so this test is getting left in the codebase but inactive.
"""

def setUp(self):
global gevent
import gevent
# import gevent.monkey
# gevent.monkey.patch_all()

import greenify, libmc
greenify.greenify()
for so_path in libmc.DYNAMIC_LIBRARIES:
assert greenify.patch_lib(so_path)

self.imp = libmc.ThreadedClient(["127.0.0.1:21211"])
self.imp.config(MC_MAX_CLIENTS, 1)

def client_threads(self, target):
ts = [gevent.spawn(target) for i in range(self.nthreads)]
gevent.joinall(ts, raise_error=True)

def tid(self, mc):
return (os.getpid(), gevent.getcurrent().name)

def test_many_eventlets(self):
self.client_threads(self.misc)

0 comments on commit 1327704

Please sign in to comment.