Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix rate limiting tests #8167

Merged
merged 2 commits into from
Aug 26, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/8167.misc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix tests that were broken due to the merge of 1.19.1.
6 changes: 4 additions & 2 deletions tests/rest/client/v1/test_rooms.py
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ class RoomJoinRatelimitTestCase(RoomBase):
)
def test_join_local_ratelimit(self):
"""Tests that local joins are actually rate-limited."""
for i in range(5):
for i in range(3):
babolivier marked this conversation as resolved.
Show resolved Hide resolved
self.helper.create_room_as(self.user_id)

self.helper.create_room_as(self.user_id, expect_code=429)
Expand All @@ -715,7 +715,9 @@ def test_join_local_ratelimit_profile_change(self):

# Create a profile for the user, since it hasn't been done on registration.
store = self.hs.get_datastore()
store.create_profile(UserID.from_string(self.user_id).localpart)
self.get_success(
store.create_profile(UserID.from_string(self.user_id).localpart)
)

# Update the display name for the user.
path = "/_matrix/client/r0/profile/%s/displayname" % self.user_id
Expand Down