mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:04:50 -04:00
Fail test cases if they fail to await all awaitables (#8690)
This commit is contained in:
parent
46f4be94b4
commit
fd7c743445
3 changed files with 39 additions and 2 deletions
|
@ -54,7 +54,7 @@ from tests.server import (
|
|||
render,
|
||||
setup_test_homeserver,
|
||||
)
|
||||
from tests.test_utils import event_injection
|
||||
from tests.test_utils import event_injection, setup_awaitable_errors
|
||||
from tests.test_utils.logging_setup import setup_logging
|
||||
from tests.utils import default_config, setupdb
|
||||
|
||||
|
@ -119,6 +119,10 @@ class TestCase(unittest.TestCase):
|
|||
|
||||
logging.getLogger().setLevel(level)
|
||||
|
||||
# Trial messes with the warnings configuration, thus this has to be
|
||||
# done in the context of an individual TestCase.
|
||||
self.addCleanup(setup_awaitable_errors())
|
||||
|
||||
return orig()
|
||||
|
||||
@around(self)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue