diff options
author | Richard van der Hoff <richard@matrix.org> | 2018-07-20 12:37:12 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2018-07-20 12:37:12 +0100 |
commit | d7275eecf3abcd5f7c645e5da47c7e7310350333 (patch) | |
tree | 255219ba76c03f38edb46436320e13db4a6be7e4 /tests/util/test_limiter.py | |
parent | Merge pull request #3564 from matrix-org/hawkowl/markdown (diff) | |
download | synapse-d7275eecf3abcd5f7c645e5da47c7e7310350333.tar.xz |
Add a sleep to the Limiter to fix stack overflows.
Fixes #3570
Diffstat (limited to '')
-rw-r--r-- | tests/util/test_limiter.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/util/test_limiter.py b/tests/util/test_limiter.py index a5a767b1ff..f7b942f5c1 100644 --- a/tests/util/test_limiter.py +++ b/tests/util/test_limiter.py @@ -48,21 +48,21 @@ class LimiterTestCase(unittest.TestCase): self.assertFalse(d4.called) self.assertFalse(d5.called) - self.assertTrue(d4.called) + cm4 = yield d4 self.assertFalse(d5.called) with cm3: self.assertFalse(d5.called) - self.assertTrue(d5.called) + cm5 = yield d5 with cm2: pass - with (yield d4): + with cm4: pass - with (yield d5): + with cm5: pass d6 = limiter.queue(key) |