summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorRichard van der Hoff <richard@matrix.org>2019-08-20 11:20:10 +0100
committerRichard van der Hoff <richard@matrix.org>2019-08-20 11:50:23 +0100
commit501994582899ad9d790029b3d7c48ba32f5720a9 (patch)
treed2e09c5417834e708df960ed29be43b881f5d7ca /tests
parentMerge pull request #5860 from matrix-org/erikj/update_5704_comments (diff)
downloadsynapse-501994582899ad9d790029b3d7c48ba32f5720a9.tar.xz
Refactor the Appservice scheduler code
Get rid of the labyrinthine `recoverer_fn` code, and clean up the startup code
(it seemed to be previously inexplicably split between
`ApplicationServiceScheduler.start` and `_Recoverer.start`).

Add some docstrings too.
Diffstat (limited to 'tests')
-rw-r--r--tests/appservice/test_scheduler.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/appservice/test_scheduler.py b/tests/appservice/test_scheduler.py

index 04b8c2c07c..52f89d3f83 100644 --- a/tests/appservice/test_scheduler.py +++ b/tests/appservice/test_scheduler.py
@@ -37,11 +37,9 @@ class ApplicationServiceSchedulerTransactionCtrlTestCase(unittest.TestCase): self.recoverer = Mock() self.recoverer_fn = Mock(return_value=self.recoverer) self.txnctrl = _TransactionController( - clock=self.clock, - store=self.store, - as_api=self.as_api, - recoverer_fn=self.recoverer_fn, + clock=self.clock, store=self.store, as_api=self.as_api ) + self.txnctrl.RECOVERER_CLASS = self.recoverer_fn def test_single_service_up_txn_sent(self): # Test: The AS is up and the txn is successfully sent.