synapse/changelog.d
Eric Eastwood e3db7b2d81
Sliding Sync: Easier to understand timeline assertions in tests (#17511)
Added `_assertTimelineEqual(...)` because I got fed up trying to
understand the crazy diffs from the standard
`self.assertEqual(...)`/`self.assertListEqual(...)`

Before:
```
[FAIL]
Traceback (most recent call last):
  File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 103, in test_rooms_limited_initial_sync
    self.assertListEqual(
  File "/usr/lib/python3.12/unittest/case.py", line 1091, in assertListEqual
    self.assertSequenceEqual(list1, list2, msg, seq_type=list)
  File "/usr/lib/python3.12/unittest/case.py", line 1073, in assertSequenceEqual
    self.fail(msg)
twisted.trial.unittest.FailTest: Lists differ: ['$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0w[95 chars]isM'] != ['$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4[95 chars]nnU']

First differing element 0:
'$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0wWA'
'$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4-E'

- ['$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0wWA',
-  '$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4-E',
? ^

+ ['$8N1XJ7e-3K_wxAanLVD3v8KQ96_B5Xj4huGkgy4N4-E',
? ^

-  '$q4PRxQ_pBZkQI1keYuZPTtExQ23DqpUI3-Lxwfj_isM']
+  '$4QcmnzhdazSnDYcYSZCS_6-MWSzM_dN3RC7TRvW0wWA',
+  '$j3Xj-t2F1wH9kUHsI8X5yqS7hkdSyN2owaArfvk8nnU']
```

After:

```
[FAIL]
Traceback (most recent call last):
  File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 178, in test_rooms_limited_initial_sync
    self._assertTimelineEqual(
  File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 110, in _assertTimelineEqual
    self._assertListEqual(
  File "/home/eric/Documents/github/element/synapse/tests/rest/client/sliding_sync/test_rooms_timeline.py", line 79, in _assertListEqual
    self.fail(f"{diff_message}\n{message}")
twisted.trial.unittest.FailTest: Items must
Expected items to be in actual ('?' = missing expected items):
 [
   (10, master) $w-BoqW1PQQFU4TzVJW5OIelugxh0mY12wrfw6mbC6D4 (m.room.message) activity4
   (11, master) $sSidTZf1EOQmCVDU4mrH_1-bopMQhwcDUO2IhoemR6M (m.room.message) activity5
?  (12, master) $bgOcc3D-2QSkbk4aBxKVyOOQJGs7ZuncRJwG3cEANZg (m.room.member, @user1:test) join
 ]
Actual ('+' = found expected items):
 [
+  (11, master) $sSidTZf1EOQmCVDU4mrH_1-bopMQhwcDUO2IhoemR6M (m.room.message) activity5
+  (10, master) $w-BoqW1PQQFU4TzVJW5OIelugxh0mY12wrfw6mbC6D4 (m.room.message) activity4
   (9, master) $FmCNyc11YeFwiJ4an7_q6H0LCCjQOKd6UCr5VKeXXUw (m.room.message, None) activity3
 ]
```
2024-08-05 13:20:15 -05:00
..
.gitignore
17447.feature Sliding Sync: Track whether we have sent rooms down to clients (#17447) 2024-07-29 22:45:48 +01:00
17450.bugfix Sliding Sync: Update filters to be robust against remote invite rooms (#17450) 2024-07-30 13:20:29 -05:00
17452.misc Use a new token format for sliding sync (#17452) 2024-07-24 11:47:25 +01:00
17476.doc Update config_documentation - Change example of msisdn in allowed_local_3pids (#17476) 2024-07-25 11:07:44 +00:00
17477.feature Sliding Sync: Add Account Data extension (MSC3959) (#17477) 2024-07-24 17:10:38 -05:00
17478.misc Sliding Sync: ensure bump stamp ignores backfilled events (#17478) 2024-07-24 15:21:56 +01:00
17479.misc Only send rooms with updates down sliding sync (#17479) 2024-07-30 09:30:44 +01:00
17481.misc Refactor Sliding Sync tests to better utilize the SlidingSyncBase (pt. 1) (#17481) 2024-07-25 10:43:35 -05:00
17482.misc Refactor Sliding Sync tests to better utilize the SlidingSyncBase.do_sync(...) (pt. 2) (#17482) 2024-07-25 11:01:47 -05:00
17489.feature Sliding Sync: Add receipts extension (MSC3960) (#17489) 2024-07-30 12:49:55 -05:00
17499.bugfix Fix failures property in /keys/query (#17499) 2024-07-30 09:51:24 +01:00
17501.misc Add some more opentracing to sliding sync (#17501) 2024-07-30 10:54:11 +01:00
17504.misc Sliding Sync: Split and move tests (#17504) 2024-07-31 12:20:46 -05:00
17505.feature Sliding Sync: Add typing notification extension (MSC3961) (#17505) 2024-07-31 13:20:23 -05:00
17507.misc Sliding Sync: Fix limited response description (make accurate) (#17507) 2024-07-31 11:47:26 -05:00
17511.misc Sliding Sync: Easier to understand timeline assertions in tests (#17511) 2024-08-05 13:20:15 -05:00