summary refs log tree commit diff
path: root/tests/test_state.py (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Stop sub-classing object (#8249)Patrick Cloke2020-09-041-2/+2
|
* Do not yield on awaitables in tests. (#8193)Patrick Cloke2020-08-271-40/+46
|
* Convert a synapse.events to async/await. (#7949)Patrick Cloke2020-07-271-7/+7
|
* Convert state resolution to async/await (#7942)Patrick Cloke2020-07-241-28/+44
|
* Clarify list/set/dict/tuple comprehensions and enforce via flake8 (#6957)Patrick Cloke2020-02-211-13/+5
| | | | Ensure good comprehension hygiene using flake8-comprehensions.
* Add a `make_event_from_dict` method (#6858)Richard van der Hoff2020-02-071-2/+2
| | | | | | | ... and use it in places where it's trivial to do so. This will make it easier to pass room versions into the FrozenEvent constructors.
* s/get_room_version/get_room_version_id/Richard van der Hoff2020-01-311-1/+1
| | | | | ... to make way for a forthcoming get_room_version which returns a RoomVersion object.
* Change EventContext to use the Storage class (#6564)Erik Johnston2019-12-201-14/+14
|
* Fix bug which caused rejected events to be stored with the wrong room state ↵Richard van der Hoff2019-11-061-11/+50
| | | | | | | | | | | | (#6320) Fixes a bug where rejected events were persisted with the wrong state group. Also fixes an occasional internal-server-error when receiving events over federation which are rejected and (possibly because they are backwards-extremities) have no prev_group. Fixes #6289.
* Port to use state storageErik Johnston2019-10-301-0/+3
|
* Remove unnecessary parentheses around return statements (#5931)Andrew Morgan2019-08-301-1/+1
| | | | | Python will return a tuple whether there are parentheses around the returned values or not. I'm just sick of my editor complaining about this all over the place :)
* Run Black. (#5482)Amber Brown2019-06-201-3/+3
|
* Migrate all tests to use the dict-based config format instead of hanging ↵Amber Brown2019-05-131-1/+1
| | | | items off HomeserverConfig (#5171)
* Merge pull request #5027 from matrix-org/babolivier/account_expirationBrendan Abolivier2019-04-091-1/+3
|\ | | | | Add time-based account expiration
| * Add account expiration featureBrendan Abolivier2019-04-091-1/+3
| |
* | Collect room-version variations into one place (#4969)Richard van der Hoff2019-04-011-2/+3
|/ | | | Collect all the things that make room-versions different to one another into one place, so that it's easier to define new room versions.
* Port tests/ to Python 3 (#3808)Amber Brown2018-09-071-1/+1
|
* Merge branch 'develop' of github.com:matrix-org/synapse into ↵Erik Johnston2018-08-201-151/+93
|\ | | | | | | erikj/refactor_state_handler
| * Run black.black2018-08-101-152/+93
| |
* | Fix testsErik Johnston2018-08-091-1/+5
|/
* Fix unit testsErik Johnston2018-07-231-12/+35
|
* run isortAmber Brown2018-07-091-5/+5
|
* Fix broken unit testRichard van der Hoff2018-06-141-2/+14
| | | | We need power levels for this test to do what it is supposed to do.
* Store state groups separately from events (#2784)Erik Johnston2018-02-061-66/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Split state group persist into seperate storage func * Add per database engine code for state group id gen * Move store_state_group to StateReadStore This allows other workers to use it, and so resolve state. * Hook up store_state_group * Fix tests * Rename _store_mult_state_groups_txn * Rename StateGroupReadStore * Remove redundant _have_persisted_state_group_txn * Update comments * Comment compute_event_context * Set start val for state_group_id_seq ... otherwise we try to recreate old state groups * Update comments * Don't store state for outliers * Update comment * Update docstring as state groups are ints
* Factor out resolve_state_groups to a separate handlerRichard van der Hoff2018-02-011-1/+3
| | | | | | We extract the storage-independent bits of the state group resolution out to a separate functiom, and stick it in a new handler, in preparation for its use from the storage layer.
* Fix typing testsErik Johnston2017-05-261-0/+2
|
* Correctly handle the difference between prev and current stateErik Johnston2016-08-311-23/+15
|
* Fix testsErik Johnston2016-08-261-5/+46
|
* Replace context.current_state with context.current_state_idsErik Johnston2016-08-251-47/+26
|
* Create log context in Measure if one doesn't existErik Johnston2016-04-181-2/+2
|
* copyrightsMatthew Hodgson2016-01-071-1/+1
|
* Fix an issue with ignoring power_level changes on divergent graphsRichard van der Hoff2015-11-121-0/+93
| | | | | | | | Changes to m.room.power_levels events are supposed to be handled at a high priority; however a typo meant that the relevant bit of code was never executed, so they were handled just like any other state change - which meant that a bad person could cause room state changes by forking the graph from a point in history when they were allowed to do so.
* Merge branch 'erikj/check_room_exists' into erikj/unfederatableErik Johnston2015-09-011-8/+29
|\
| * Fix testsErik Johnston2015-09-011-8/+29
| |
* | Check against sender rather than event_idErik Johnston2015-09-011-1/+1
|/
* Use dictionary cache to do group -> state fetchingErik Johnston2015-08-051-1/+1
|
* Fix testsErik Johnston2015-02-091-1/+6
|
* Implement new state resolution algorithmErik Johnston2015-01-211-71/+357
|
* Construct the EventContext in the state handler rather than constructing one ↵Mark Haines2014-12-161-14/+8
| | | | and then immediately calling state_handler.annotate_context_with_state
* Remove annotate_event_with_state as nothing was using it. Update state tests ↵Mark Haines2014-12-161-69/+39
| | | | to call annotate_context_with_state
* Rename annotate_state_groups to annotate_event_with_stateErik Johnston2014-11-111-6/+6
|
* Fix state testsErik Johnston2014-11-111-517/+176
|
* SPEC-7: Rename 'ts' to 'origin_server_ts'Mark Haines2014-10-171-1/+1
|
* Fixed test.Kegan Dougal2014-10-091-1/+0
|
* Still broken.Kegan Dougal2014-10-091-1/+2
|
* Break a test.Kegan Dougal2014-10-091-1/+1
|
* Fix unit test.Kegan Dougal2014-10-081-1/+1
|
* Break unit test.Kegan Dougal2014-10-081-1/+1
|
* Have all unit tests import from our own subclass of trial's unittest ↵Paul "LeoNerd" Evans2014-09-121-2/+1
| | | | TestCase; set up logging in ONE PLACE ONLY
* Make the state resolution use actual power levels rather than taking them ↵Erik Johnston2014-09-121-45/+140
| | | | from a Pdu key.
* Handle the case where we don't have a common ancestorErik Johnston2014-09-081-0/+24
|
* Fix bug in state handling where we incorrectly identified a missing pdu. ↵Erik Johnston2014-09-081-15/+218
| | | | Update tests to catch this case.
* Fix state unit testErik Johnston2014-09-061-0/+1
|
* fix the copyright holder from matrix.org to OpenMarket Ltd, as matrix.org ↵Matthew Hodgson2014-09-031-1/+1
| | | | hasn't been incorporated in time for launch.
* Start updating state handling to use snapshotsMark Haines2014-08-271-7/+10
|
* Fix some of the tests to reflect changes in the storage layer.Erik Johnston2014-08-151-2/+2
|
* Add a check to make sure that during state conflict res we only request a ↵Erik Johnston2014-08-151-0/+3
| | | | PDU we don't have.
* add in copyrights to everything, not just the synapse subdir, and add a ↵Matthew Hodgson2014-08-131-0/+14
| | | | copyrighter.pl whilst we're at it
* Reference Matrix Home Servermatrix.org2014-08-121-0/+271