diff --git a/tests/msc4140/delayed_event_test.go b/tests/msc4140/delayed_event_test.go index 7bf7534a..4384411b 100644 --- a/tests/msc4140/delayed_event_test.go +++ b/tests/msc4140/delayed_event_test.go @@ -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( @@ -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) @@ -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)) }) }