1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-13 14:12:56 +08:00

Fix test race condition

async loads
This commit is contained in:
Dean Herbert 2017-12-26 20:13:55 +09:00
parent 44fbe7859a
commit 1c4bcdda96

View File

@ -110,11 +110,15 @@ namespace osu.Game.Tests.Visual
private void selectBeatmap(string name) private void selectBeatmap(string name)
{ {
var infoBefore = infoWedge.Info;
AddStep($"select {name} beatmap", () => AddStep($"select {name} beatmap", () =>
{ {
beatmap.Value = new TestWorkingBeatmap(beatmaps.First(b => b.BeatmapInfo.Ruleset.ShortName == name)); beatmap.Value = new TestWorkingBeatmap(beatmaps.First(b => b.BeatmapInfo.Ruleset.ShortName == name));
infoWedge.UpdateBeatmap(beatmap); infoWedge.UpdateBeatmap(beatmap);
}); });
AddUntilStep(() => infoWedge.Info != infoBefore, "wait for async load");
} }
private void selectNullBeatmap() private void selectNullBeatmap()