From 56ad684f5b72271476ed430e78d45fb3e0c8e40a Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 9 Mar 2022 01:11:34 +0900 Subject: [PATCH] Fix potential test failure on slow realm callback in `TestSceneBeatmapDownloadButton` As brought to light by https://gist.github.com/smoogipoo/56eda7ab56b9d1966556f2ca7a80a847. --- .../Visual/Online/TestSceneBeatmapDownloadButton.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/Online/TestSceneBeatmapDownloadButton.cs b/osu.Game.Tests/Visual/Online/TestSceneBeatmapDownloadButton.cs index d9f01622da..8d8879490d 100644 --- a/osu.Game.Tests/Visual/Online/TestSceneBeatmapDownloadButton.cs +++ b/osu.Game.Tests/Visual/Online/TestSceneBeatmapDownloadButton.cs @@ -41,7 +41,7 @@ namespace osu.Game.Tests.Visual.Online AddUntilStep("ensure manager loaded", () => beatmaps != null); ensureSoleilyRemoved(); createButtonWithBeatmap(createSoleily()); - AddAssert("button state not downloaded", () => downloadButton.DownloadState == DownloadState.NotDownloaded); + AddUntilStep("button state not downloaded", () => downloadButton.DownloadState == DownloadState.NotDownloaded); AddStep("import soleily", () => beatmaps.Import(TestResources.GetQuickTestBeatmapForImport())); AddUntilStep("wait for beatmap import", () => beatmaps.GetAllUsableBeatmapSets().Any(b => b.OnlineID == 241526)); @@ -50,7 +50,7 @@ namespace osu.Game.Tests.Visual.Online createButtonWithBeatmap(createSoleily()); AddUntilStep("button state downloaded", () => downloadButton.DownloadState == DownloadState.LocallyAvailable); ensureSoleilyRemoved(); - AddAssert("button state not downloaded", () => downloadButton.DownloadState == DownloadState.NotDownloaded); + AddUntilStep("button state not downloaded", () => downloadButton.DownloadState == DownloadState.NotDownloaded); } private void ensureSoleilyRemoved()