Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fixed ReconnectTestCase

  • Loading branch information...
commit f8be42f98e72b010d33eef315088e1c3c8f52452 1 parent c65f35f
@evilkost authored
Showing with 20 additions and 19 deletions.
  1. +20 −19 tests/server_commands.py
View
39 tests/server_commands.py
@@ -870,29 +870,30 @@ def simulate(client, callbacks):
class ReconnectTestCase(TornadoTestCase):
def test_redis_timeout(self):
- self.client.set('foo', 'bar', self.expect(True))
- self.delayed(10, lambda:
- self.client.get('foo', [
- self.expect('bar'),
- self.finish
- ])
- )
- self.start()
+ self._run_plan([
+ ('set', ('foo', 'bar'), self.expect(True)),
+ lambda cb: self.delayed(10, lambda:
+ self.client.get('foo', [
+ self.expect('bar'),
+ cb
+ ])
+ )
+ ])
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()
-
+ self._run_plan([
+ ('set', ('foo', 'bar'), self.expect(True)),
+ lambda cb: self.delayed(10, lambda:
+ pipe.execute([
+ self.pexpect([
+ 'bar',
+ ]),
+ cb,
+ ])
+ )
+ ])
if __name__ == '__main__':
unittest.main()
Please sign in to comment.
Something went wrong with that request. Please try again.