From 110f16356e6513a71dc029b49e224264a45d507a Mon Sep 17 00:00:00 2001 From: Elephant Liu Date: Wed, 29 Nov 2023 13:04:00 +0800 Subject: [PATCH] [WIP]fix ci --- tests/shabby/reconnect_delay.py | 6 ++++++ tests/test_cmemcached_regression.py | 3 +++ 2 files changed, 9 insertions(+) diff --git a/tests/shabby/reconnect_delay.py b/tests/shabby/reconnect_delay.py index e85c109e..3d56bff1 100644 --- a/tests/shabby/reconnect_delay.py +++ b/tests/shabby/reconnect_delay.py @@ -44,6 +44,12 @@ def test_hard_server_error(): assert mc.set('foo', 1) memcached_server_ctl('stop', normal_port) + + # I dont know why, + # but the server is still connectable after stop. + # add a sleep to wait for the server quit + time.sleep(3) + assert not mc.set('foo', 1) # fail memcached_server_ctl('start', normal_port) assert not mc.set('foo', 1) # still fail diff --git a/tests/test_cmemcached_regression.py b/tests/test_cmemcached_regression.py index 039a1fbc..908f0978 100644 --- a/tests/test_cmemcached_regression.py +++ b/tests/test_cmemcached_regression.py @@ -39,6 +39,9 @@ class NoPickle(object): def __getattr__(self, name): pass + def __getstate__(self): + raise Exception('can not be pickled') + class CmemcachedRegressionCase(unittest.TestCase):