synapse/tests
Richard van der Hoff 31b554c297
Fixes for opentracing scopes (#11869)
`start_active_span` was inconsistent as to whether it would activate the span
immediately, or wait for `scope.__enter__` to happen (it depended on whether
the current logcontext already had an associated scope). The inconsistency was
rather confusing if you were hoping to set up a couple of separate spans before
activating either.

Looking at the other implementations of opentracing `ScopeManager`s, the
intention is that it *should* be activated immediately, as the name
implies. Indeed, the idea is that you don't have to use the scope as a
contextmanager at all - you can just call `.close` on the result. Hence, our
cleanup has to happen in `.close` rather than `.__exit__`.

So, the main change here is to ensure that `start_active_span` does activate
the span, and that `scope.close()` does close the scope.

We also add some tests, which requires a `tracer` param so that we don't have
to rely on the global variable in unit tests.
2022-02-02 22:41:57 +00:00
..
api Allow tracking puppeted users for MAU (#11561) 2022-01-12 16:09:36 +00:00
app Don't start Synapse master process if worker_app is set (#11416) 2021-11-30 10:12:18 -08:00
appservice Convert ApplicationServiceTestCase to use simple_async_mock (#11880) 2022-02-01 17:45:13 +00:00
config Support configuring the lifetime of non-refreshable access tokens separately to refreshable access tokens. (#11445) 2021-12-03 16:42:44 +00:00
crypto Deal with mypy errors w/ type-hinted pynacl 1.5.0 (#11714) 2022-01-12 14:54:06 +00:00
events Strip "join_authorised_via_users_server" from join events which do not need it. (#10933) 2021-10-01 11:39:17 -04:00
federation Include the topic event in the prejoin state, per MSC3173. (#11666) 2022-01-04 11:08:08 -05:00
handlers Add a background database update to purge account data for deactivated users. (#11655) 2022-02-02 11:37:18 +00:00
http Add a regression test for using both webclient and client resources simultaneously (#11765) 2022-01-20 09:47:29 -05:00
logging Fixes for opentracing scopes (#11869) 2022-02-02 22:41:57 +00:00
module_api Remove a debug statement from tests. (#11239) 2021-11-03 13:11:16 +00:00
push Make background updates controllable via a plugin (#11306) 2021-11-29 17:57:06 +01:00
replication Make the get_global_account_data_by_type_for_user cache be a tree-cache whose key is prefixed with the user ID (#11788) 2022-01-21 08:38:36 +00:00
rest Expose the registered device ID from the register_appservice_user test helper. (#11615) 2022-02-02 09:59:55 +00:00
scripts
server_notices Use direct references for configuration variables (part 6). (#10916) 2021-09-29 06:44:15 -04:00
state
storage Expose the registered device ID from the register_appservice_user test helper. (#11615) 2022-02-02 09:59:55 +00:00
test_utils Cache empty responses from /user/devices (#11587) 2022-01-05 13:33:28 +00:00
util Re-apply: Move glob_to_regex and re_word_boundary to matrix-python-common #11505 (#11687) 2022-01-05 11:41:49 +00:00
__init__.py
server.py Support rendering previews with data: URLs in them (#11767) 2022-01-24 08:58:18 -05:00
test_distributor.py
test_event_auth.py Check *all* auth events for room id and rejection (#11009) 2021-10-18 18:28:30 +01:00
test_federation.py Strip unauthorized fields from unsigned object in events received over federation (#11530) 2022-01-06 09:09:30 -08:00
test_mau.py Revert change to counting of deactivated users towards the monthly active users limit (#11127) 2021-10-20 11:05:29 +01:00
test_metrics.py
test_phone_home.py
test_server.py
test_state.py
test_terms_auth.py
test_test_utils.py
test_types.py
test_visibility.py Clean up tests.test_visibility to remove legacy code. (#11495) 2021-12-02 18:13:30 +00:00
unittest.py Expose the registered device ID from the register_appservice_user test helper. (#11615) 2022-02-02 09:59:55 +00:00
utils.py Optionally use an on-disk sqlite db in tests (#11702) 2022-01-07 19:13:41 +00:00