element-hq / element-hq/synapse
Disable `SYNAPSE_TEST_PATCH_LOG_CONTEXTS` causing false negatives in tests
- Dominant language
- Python
- Stars
- 4.6k
- Forks
- 600
- Avg merge
- 5d 22h
- Merged PRs (30d)
- 51
Description
This issue has been migrated from [#12796](https://github.com/matrix-org/synapse/issues/12796).
---
`SYNAPSE_TEST_PATCH_LOG_CONTEXTS` causes Synapse to monkey-patch `defer.inlineCallbacks` to add some checks that we handle logcontexts correctly. We enable it when running sytests (and possibly trial tests?)
The problem is that it is now causing false negatives (in particular, `txredisapi` also uses `inlineCallbacks`, and because it's not Synapse code, it fails the checks).
A better alternative might be to modify the places we use `defer.ensureDeferred` to do this wrapping instead. For now, we should probably just disable it.
Contributor guide
Assessment
This issue has not been assessed yet.