diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-08-13 16:47:46 +1000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-13 16:47:46 +1000 |
commit | 99dd975dae7baaaef2a3b0a92fa51965b121ae34 (patch) | |
tree | 31fff38e9be8ffb8d4407b02cdf9a07247a11f1b /tests/server.py | |
parent | Merge pull request #3679 from matrix-org/hawkowl/blackify-tests (diff) | |
download | synapse-99dd975dae7baaaef2a3b0a92fa51965b121ae34.tar.xz |
Run tests under PostgreSQL (#3423)
Diffstat (limited to 'tests/server.py')
-rw-r--r-- | tests/server.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/server.py b/tests/server.py index 05708be8b9..beb24cf032 100644 --- a/tests/server.py +++ b/tests/server.py @@ -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): |