Skip to content

Commit

Permalink
Use MustSyncUntil to avoid a race
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robertson committed Jan 23, 2023
1 parent 70f58ac commit 8301105
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/federation_room_join_partial_state_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1114,11 +1114,11 @@ func TestPartialStateJoin(t *testing.T) {
psjResult.FinishStateRequest()

// the /sync request should now complete, with the new room
response, _ = alice.MustSync(t, client.SyncReq{Since: nextBatch})

if !response.Get(syncJoinedRoomPath).Exists() {
t.Fatal("Sync should now include the joined room since resync is over")
}
nextBatch = alice.MustSyncUntil(
t,
client.SyncReq{Since: nextBatch},
client.SyncJoinedTo(alice.UserID, serverRoom.RoomID),
)
})

// test that a partial-state join can fall back to other homeservers when re-syncing
Expand Down

0 comments on commit 8301105

Please sign in to comment.