mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-08-05 22:44:10 -04:00
Run tests under PostgreSQL (#3423)
This commit is contained in:
parent
a001038b92
commit
99dd975dae
49 changed files with 227 additions and 59 deletions
|
@ -147,12 +147,15 @@ class ThreadedMemoryReactorClock(MemoryReactorClock):
|
|||
return d
|
||||
|
||||
|
||||
def setup_test_homeserver(*args, **kwargs):
|
||||
def setup_test_homeserver(cleanup_func, *args, **kwargs):
|
||||
"""
|
||||
Set up a synchronous test server, driven by the reactor used by
|
||||
the homeserver.
|
||||
"""
|
||||
d = _sth(*args, **kwargs).result
|
||||
d = _sth(cleanup_func, *args, **kwargs).result
|
||||
|
||||
if isinstance(d, Failure):
|
||||
d.raiseException()
|
||||
|
||||
# Make the thread pool synchronous.
|
||||
clock = d.get_clock()
|
||||
|
@ -189,6 +192,9 @@ def setup_test_homeserver(*args, **kwargs):
|
|||
def start(self):
|
||||
pass
|
||||
|
||||
def stop(self):
|
||||
pass
|
||||
|
||||
def callInThreadWithCallback(self, onResult, function, *args, **kwargs):
|
||||
def _(res):
|
||||
if isinstance(res, Failure):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue