mirror of
https://github.com/hoernschen/dendrite.git
synced 2025-08-02 06:12:45 +00:00
Per-user-per-device sync streams (#1068)
* Per-user-per-device sync streams * Tweaks * Tweaks * Pass full device into CompleteSync * Set user IDs and device IDs properly in tests * Add new test, fix TestNewEventAndWasPreviouslyJoinedToRoom * nolint a function that is not used yet * Add test for waking up single device * Hopefully unstick test * Try to ensure that TestCorrectStreamWakeup doesn't block forever * Update tests
This commit is contained in:
parent
57841fc35e
commit
02fe38e1f7
8 changed files with 161 additions and 70 deletions
|
@ -181,7 +181,7 @@ func TestSyncResponse(t *testing.T) {
|
|||
Name: "CompleteSync limited",
|
||||
DoSync: func() (*types.Response, error) {
|
||||
// limit set to 5
|
||||
return db.CompleteSync(ctx, testUserIDA, 5)
|
||||
return db.CompleteSync(ctx, testUserDeviceA, 5)
|
||||
},
|
||||
// want the last 5 events
|
||||
WantTimeline: events[len(events)-5:],
|
||||
|
@ -193,7 +193,7 @@ func TestSyncResponse(t *testing.T) {
|
|||
{
|
||||
Name: "CompleteSync",
|
||||
DoSync: func() (*types.Response, error) {
|
||||
return db.CompleteSync(ctx, testUserIDA, len(events)+1)
|
||||
return db.CompleteSync(ctx, testUserDeviceA, len(events)+1)
|
||||
},
|
||||
WantTimeline: events,
|
||||
// We want no state at all as that field in /sync is the delta between the token (beginning of time)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue