Skip to content
Merged
Changes from all commits
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
13 changes: 2 additions & 11 deletions tests/msc4140/delayed_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,11 +371,6 @@ func TestDelayedEvents(t *testing.T) {

numberOfDelayedEvents := 0

// Start a sync loop (initial sync)
since := user.MustSyncUntil(
t, client.SyncReq{},
)

// Send an initial delayed event that will be ready to send as soon as the server
// comes back up.
user.MustDo(
Expand Down Expand Up @@ -445,9 +440,7 @@ func TestDelayedEvents(t *testing.T) {
remainingDelayedEventCount := countDelayedEvents(t, delayedEventResponse)
// Sanity check that the room state was updated correctly with the delayed events
// that were sent.
since = user.MustSyncUntil(t, client.SyncReq{Since: since}, client.SyncStateHas(roomID, func(ev gjson.Result) bool {
return ev.Get("type").Str == eventType && ev.Get("state_key").Str == stateKey1
}))
user.MustDo(t, "GET", getPathForState(roomID, eventType, stateKey1))

// Wait until we see another delayed event being sent (ensure things resumed and are continuing).
time.Sleep(10 * time.Second)
Expand All @@ -459,9 +452,7 @@ func TestDelayedEvents(t *testing.T) {
// FIXME: Ideally, we'd check specifically for the last one that was sent but it
// will be a bit of a juggle and fiddly to get this right so for now we just check
// one.
since = user.MustSyncUntil(t, client.SyncReq{Since: since}, client.SyncStateHas(roomID, func(ev gjson.Result) bool {
return ev.Get("type").Str == eventType && ev.Get("state_key").Str == stateKey2
}))
user.MustDo(t, "GET", getPathForState(roomID, eventType, stateKey2))
})
}

Expand Down
Loading