1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 10:33:30 +08:00

Fix fire-and-forget async calls to use WaitSafely

This commit is contained in:
Dean Herbert 2022-02-11 16:02:42 +09:00
parent 908c31c687
commit 6005daeba8

View File

@ -829,7 +829,7 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem
{ {
BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID
}))); })).WaitSafely());
AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2); AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2);
@ -860,11 +860,11 @@ namespace osu.Game.Tests.Visual.Multiplayer
AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem AddStep("add item as other user", () => client.AddUserPlaylistItem(1234, new MultiplayerPlaylistItem(new PlaylistItem
{ {
BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID BeatmapID = beatmaps.GetWorkingBeatmap(importedSet.Beatmaps.First(b => b.Ruleset.OnlineID == 0)).BeatmapInfo.OnlineID
}))); })).WaitSafely());
AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2); AddUntilStep("item arrived in playlist", () => client.Room?.Playlist.Count == 2);
AddStep("delete item as other user", () => client.RemoveUserPlaylistItem(1234, 2)); AddStep("delete item as other user", () => client.RemoveUserPlaylistItem(1234, 2).WaitSafely());
AddUntilStep("item removed from playlist", () => client.Room?.Playlist.Count == 1); AddUntilStep("item removed from playlist", () => client.Room?.Playlist.Count == 1);
AddStep("exit gameplay as initial user", () => multiplayerComponents.MultiplayerScreen.MakeCurrent()); AddStep("exit gameplay as initial user", () => multiplayerComponents.MultiplayerScreen.MakeCurrent());