diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2018-01-09 14:21:03 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-09 14:21:03 +0000 |
commit | a767f06e3f2b2c15a779c1f9df7d358255ebe38c (patch) | |
tree | babd2110f8b0d964f157e14d096273ee37a8abd0 /tests/unittest.py | |
parent | Merge pull request #2763 from matrix-org/rav/fix_config_uts (diff) | |
parent | enable twisted delayedcall debugging in UTs (diff) | |
download | synapse-a767f06e3f2b2c15a779c1f9df7d358255ebe38c.tar.xz |
Merge pull request #2765 from matrix-org/rav/fix_room_uts
Fix flaky test_rooms UTs
Diffstat (limited to 'tests/unittest.py')
-rw-r--r-- | tests/unittest.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/unittest.py b/tests/unittest.py index 38715972dd..7b478c4294 100644 --- a/tests/unittest.py +++ b/tests/unittest.py @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. - +import twisted from twisted.trial import unittest import logging @@ -65,6 +65,10 @@ class TestCase(unittest.TestCase): @around(self) def setUp(orig): + # enable debugging of delayed calls - this means that we get a + # traceback when a unit test exits leaving things on the reactor. + twisted.internet.base.DelayedCall.debug = True + old_level = logging.getLogger().level if old_level != level: |