From 68bad9a277b33b9ae35c2f4ea1fd7d3a128832b5 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 16 Aug 2024 17:39:45 +0900 Subject: [PATCH] Attempt file operations more than once in another test instance See https://github.com/ppy/osu/pull/29433/checks?check_run_id=28833985792. --- .../Visual/Navigation/TestSceneScreenNavigation.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs index 2b2358198443..db9ecd90b9fe 100644 --- a/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs +++ b/osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs @@ -276,8 +276,11 @@ public void TestAttemptPlayBeatmapMissingFails() AddStep("delete beatmap files", () => { - foreach (var file in Game.Beatmap.Value.BeatmapSetInfo.Files.Where(f => Path.GetExtension(f.Filename) == ".osu")) - Game.Storage.Delete(Path.Combine("files", file.File.GetStoragePath())); + FileUtils.AttemptOperation(() => + { + foreach (var file in Game.Beatmap.Value.BeatmapSetInfo.Files.Where(f => Path.GetExtension(f.Filename) == ".osu")) + Game.Storage.Delete(Path.Combine("files", file.File.GetStoragePath())); + }); }); AddStep("invalidate cache", () =>