summary refs log tree commit diff
path: root/tests/server.py
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-08-13 16:47:46 +1000
committerGitHub <noreply@github.com>2018-08-13 16:47:46 +1000
commit99dd975dae7baaaef2a3b0a92fa51965b121ae34 (patch)
tree31fff38e9be8ffb8d4407b02cdf9a07247a11f1b /tests/server.py
parentMerge pull request #3679 from matrix-org/hawkowl/blackify-tests (diff)
downloadsynapse-99dd975dae7baaaef2a3b0a92fa51965b121ae34.tar.xz
Run tests under PostgreSQL (#3423)
Diffstat (limited to 'tests/server.py')
-rw-r--r--tests/server.py10
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):