summary refs log tree commit diff
path: root/tests/utils.py
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2016-03-03 11:39:25 +0000
committerRichard van der Hoff <richard@matrix.org>2016-03-03 11:39:25 +0000
commit79f34bdbc2720a832cdab36ba58e83201e549c41 (patch)
tree2bdadb2bd2d2dac1a6722c4d33ca81febb7d7ece /tests/utils.py
parentFix typo (diff)
parentjenkins.sh: set -x (diff)
downloadsynapse-79f34bdbc2720a832cdab36ba58e83201e549c41.tar.xz
Merge branch 'develop' into rav/SYN-642
Diffstat (limited to 'tests/utils.py')
-rw-r--r--tests/utils.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py
index bf7a31ff9e..dfbee5c23a 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -239,9 +239,10 @@ class MockClock(object):
     def looping_call(self, function, interval):
         pass
 
-    def cancel_call_later(self, timer):
+    def cancel_call_later(self, timer, ignore_errs=False):
         if timer[2]:
-            raise Exception("Cannot cancel an expired timer")
+            if not ignore_errs:
+                raise Exception("Cannot cancel an expired timer")
 
         timer[2] = True
         self.timers = [t for t in self.timers if t != timer]