Skip to content

Commit

Permalink
Attempt file operations more than once in another test instance
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Aug 16, 2024
1 parent 4ea7d9f commit 68bad9a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions osu.Game.Tests/Visual/Navigation/TestSceneScreenNavigation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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", () =>
Expand Down

0 comments on commit 68bad9a

Please sign in to comment.