Skip to content
Browse files

+ReconnectTestCase.test_redis_timeout_with_pipe

  • Loading branch information...
1 parent 7837863 commit 63ba42b9edfa263f9f276574fd0504fb19bcaac7 @evilkost committed Apr 14, 2011
Showing with 19 additions and 1 deletion.
  1. +19 −1 tests/server_commands.py
View
20 tests/server_commands.py
@@ -13,6 +13,7 @@
from brukva.adisp import process, async
from brukva.exceptions import ResponseError
+import logging; logging.basicConfig()
def callable(obj):
return hasattr(obj, '__call__')
@@ -716,8 +717,9 @@ def simulate(client, callbacks):
self.loop.add_callback(lambda: simulate(self.client, self.finish))
self.start()
+
class ReconnectTestCase(TornadoTestCase):
- def test_run_stop_redis(self):
+ def test_redis_timeout(self):
self.client.set('foo', 'bar', self.expect(True))
self.delayed(10, lambda:
self.client.get('foo', [
@@ -727,5 +729,21 @@ def test_run_stop_redis(self):
)
self.start()
+ def test_redis_timeout_with_pipe(self):
+ self.client.set('foo', 'bar', self.expect(True))
+ pipe = self.client.pipeline(transactional=True)
+ pipe.get('foo')
+
+ self.delayed(10, lambda:
+ pipe.execute([
+ self.pexpect([
+ 'bar',
+ ]),
+ self.finish,
+ ])
+ )
+ self.start()
+
+
if __name__ == '__main__':
unittest.main()

0 comments on commit 63ba42b

Please sign in to comment.
Something went wrong with that request. Please try again.