This repository was archived by the owner on Apr 26, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
This repository was archived by the owner on Apr 26, 2024. It is now read-only.
Disallow /batch_send
usage in a room where the room version doesn't support it or is not the room creator #13216
Copy link
Copy link
Open
Labels
S-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.
Description
Description
Currently, we just don't persist the insertion, batch, and marker events but we shouldn't allow the /batch_send
usage in the first place to make it more obvious.
Steps to reproduce
I created a test case here that reproduces this issue 100% of the time. It's a near copy-paste of another one of the batch send test cases, but with different assertion logic.
Homeserver
Branch based off of 0c95313
Synapse Version
{"server_version":"1.61.0 (b=develop,f33356e8f8)","python_version":"3.10.4"}
Installation Method
No response
Platform
NixOS. Running in Python virtualenv.
Relevant log output
$ trial tests.rest.client.test_room_batch
tests.rest.client.test_room_batch
RoomBatchTestCase
test_room_batch_event_id_persistence ... [FAIL]
test_same_state_groups_for_whole_historical_batch ... [OK]
test_sync_while_batch_importing ... [OK]
===============================================================================
[FAIL]
Traceback (most recent call last):
File "/home/sumner/projects/beeper/synapse/tests/rest/client/test_room_batch.py", line 337, in test_room_batch_event_id_persistence
self.assertEqual(
File "/home/sumner/projects/beeper/.venv/lib/python3.10/site-packages/twisted/trial/_synctest.py", line 422, in assertEqual
super().assertEqual(first, second, msg)
File "/nix/store/40n9pd613v8fc3x39yjrgs1i7d4q8yl0-python3-3.10.4/lib/python3.10/unittest/case.py", line 845, in assertEqual
assertion_func(first, second, msg=msg)
File "/nix/store/40n9pd613v8fc3x39yjrgs1i7d4q8yl0-python3-3.10.4/lib/python3.10/unittest/case.py", line 838, in _baseAssertEqual
raise self.failureException(msg)
twisted.trial.unittest.FailTest: None != '$YtSa2mJ7KNSHoiLf7tf63Jn7rOnxmezUts1gaE-pKFk'
tests.rest.client.test_room_batch.RoomBatchTestCase.test_room_batch_event_id_persistence
-------------------------------------------------------------------------------
Ran 3 tests in 2.834s
FAILED (failures=1, successes=2)
Anything else that would be useful to know?
No response
Metadata
Metadata
Assignees
Labels
S-TolerableMinor significance, cosmetic issues, low or no impact to users.Minor significance, cosmetic issues, low or no impact to users.T-DefectBugs, crashes, hangs, security vulnerabilities, or other reported issues.Bugs, crashes, hangs, security vulnerabilities, or other reported issues.