summary refs log tree commit diff
path: root/tests/rest
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2020-08-24 13:08:33 -0400
committerGitHub <noreply@github.com>2020-08-24 13:08:33 -0400
commit3f8f96be00104e1d1d42fde8e513985fc66201bf (patch)
tree42d2b0e0d53b586432d5700c7440a67d0e655fe8 /tests/rest
parentDon't fail /submit_token requests on incorrect session ID if request_token_in... (diff)
downloadsynapse-3f8f96be00104e1d1d42fde8e513985fc66201bf.tar.xz
Fix flaky shadow-ban tests. (#8152)
Diffstat (limited to 'tests/rest')
-rw-r--r--tests/rest/client/v1/test_rooms.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/rest/client/v1/test_rooms.py b/tests/rest/client/v1/test_rooms.py
index e674eb90d7..286e0ccdcc 100644
--- a/tests/rest/client/v1/test_rooms.py
+++ b/tests/rest/client/v1/test_rooms.py
@@ -21,7 +21,7 @@
 import json
 from urllib import parse as urlparse
 
-from mock import Mock
+from mock import Mock, patch
 
 import synapse.rest.admin
 from synapse.api.constants import EventContentFields, EventTypes, Membership
@@ -1976,6 +1976,8 @@ class RoomCanonicalAliasTestCase(unittest.HomeserverTestCase):
         self._set_canonical_alias({"alt_aliases": ["@unknown:test"]}, expected_code=400)
 
 
+# To avoid the tests timing out don't add a delay to "annoy the requester".
+@patch("random.randint", new=lambda a, b: 0)
 class ShadowBannedTestCase(unittest.HomeserverTestCase):
     servlets = [
         synapse.rest.admin.register_servlets_for_client_rest_resource,