Browse files

Fix broken test

  • Loading branch information...
1 parent 7fd8bf4 commit 921a5ba41c0fde23cd389ddbbe193487c894f393 @oldpatricka oldpatricka committed Jan 4, 2013
Showing with 8 additions and 2 deletions.
  1. +8 −2 dashi/tests/test_dashi.py
View
10 dashi/tests/test_dashi.py
@@ -1,3 +1,4 @@
+import socket
import unittest
import threading
from functools import partial
@@ -383,8 +384,13 @@ def test_heartbeats(self):
caught_exp = e
assert caught_exp
- receiver.conn.consumer_timeout = 1
- receiver.consume(1)
+ receiver.conn.consumer_timeout = 0.1
+ caught_timeout = None
+ try:
+ receiver.consume(1)
+ except socket.timeout, e:
+ caught_timeout = e
+ assert caught_timeout
receiver.clear()

0 comments on commit 921a5ba

Please sign in to comment.