Add realm refresh steps in an attempt to stabilise failing test

I think this is required because there is a higher chance of batched
updates with the new structure (and less calls to `BeatmapSetsChanged`
which causes re-selection).
This commit is contained in:
Dean Herbert 2023-12-19 02:08:25 +09:00
parent d81cabc063
commit 41485c19cf
No known key found for this signature in database

View File

@ -464,6 +464,8 @@ namespace osu.Game.Tests.Visual.SongSelect
manager.Import(testBeatmapSetInfo);
}, 10);
AddStep("Force realm refresh", () => Realm.Run(r => r.Refresh()));
AddUntilStep("has selection", () => songSelect!.Carousel.SelectedBeatmapInfo?.BeatmapSet?.OnlineID == originalOnlineSetID);
Task<Live<BeatmapSetInfo>?> updateTask = null!;
@ -476,6 +478,8 @@ namespace osu.Game.Tests.Visual.SongSelect
});
AddUntilStep("wait for update completion", () => updateTask.IsCompleted);
AddStep("Force realm refresh", () => Realm.Run(r => r.Refresh()));
AddUntilStep("retained selection", () => songSelect!.Carousel.SelectedBeatmapInfo?.BeatmapSet?.OnlineID == originalOnlineSetID);
}