summary refs log tree commit diff
path: root/tests/appservice
diff options
context:
space:
mode:
authorKegan Dougal <kegan@matrix.org>2015-03-09 17:01:19 +0000
committerKegan Dougal <kegan@matrix.org>2015-03-09 17:01:19 +0000
commit21fd84dcb8645a555cc35adb8b2a5a68536b8087 (patch)
treeb400ce68a36fcd01e3f4fca568a43f6ae55e9a36 /tests/appservice
parentFinish appservice txn storage impl and tests. (diff)
downloadsynapse-21fd84dcb8645a555cc35adb8b2a5a68536b8087.tar.xz
Use seconds; start gluing in the AS scheduler into the AS handler.
Diffstat (limited to 'tests/appservice')
-rw-r--r--tests/appservice/test_scheduler.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/appservice/test_scheduler.py b/tests/appservice/test_scheduler.py
index 9532bf66b8..e18e879319 100644
--- a/tests/appservice/test_scheduler.py
+++ b/tests/appservice/test_scheduler.py
@@ -162,7 +162,7 @@ class ApplicationServiceSchedulerRecovererTestCase(unittest.TestCase):
         self.assertEquals(0, self.store.get_oldest_unsent_txn.call_count)
         txn.send = Mock(return_value=True)
         # wait for exp backoff
-        self.clock.advance_time(2000)
+        self.clock.advance_time(2)
         self.assertEquals(1, txn.send.call_count)
         self.assertEquals(1, txn.complete.call_count)
         # 2 because it needs to get None to know there are no more txns
@@ -185,21 +185,21 @@ class ApplicationServiceSchedulerRecovererTestCase(unittest.TestCase):
         self.recoverer.recover()
         self.assertEquals(0, self.store.get_oldest_unsent_txn.call_count)
         txn.send = Mock(return_value=False)
-        self.clock.advance_time(2000)
+        self.clock.advance_time(2)
         self.assertEquals(1, txn.send.call_count)
         self.assertEquals(0, txn.complete.call_count)
         self.assertEquals(0, self.callback.call_count)
-        self.clock.advance_time(4000)
+        self.clock.advance_time(4)
         self.assertEquals(2, txn.send.call_count)
         self.assertEquals(0, txn.complete.call_count)
         self.assertEquals(0, self.callback.call_count)
-        self.clock.advance_time(8000)
+        self.clock.advance_time(8)
         self.assertEquals(3, txn.send.call_count)
         self.assertEquals(0, txn.complete.call_count)
         self.assertEquals(0, self.callback.call_count)
         txn.send = Mock(return_value=True)  # successfully send the txn
         pop_txn = True  # returns the txn the first time, then no more.
-        self.clock.advance_time(16000)
+        self.clock.advance_time(16)
         self.assertEquals(1, txn.send.call_count)  # new mock reset call count
         self.assertEquals(1, txn.complete.call_count)
         self.callback.assert_called_once_with(self.recoverer)