Skip to content

Commit

Permalink
+ReconnectTestCase.test_redis_timeout_with_pipe
Browse files Browse the repository at this point in the history
  • Loading branch information
evilkost committed Apr 14, 2011
1 parent 7837863 commit 63ba42b
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion tests/server_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -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__')

Expand Down Expand Up @@ -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', [
Expand All @@ -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.