1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 11:42:56 +08:00

Merge pull request #3103 from peppy/fix-testing-regression

Fix fatal test result on temporary file deletion failures
This commit is contained in:
Dan Balasescu 2018-07-23 19:44:25 +09:00 committed by GitHub
commit 9dc55688d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 16 additions and 1 deletions

View File

@ -54,6 +54,12 @@ namespace osu.Game.Tests.Visual
public new BeatmapCarousel Carousel => base.Carousel;
}
protected override void Dispose(bool isDisposing)
{
factory.ResetDatabase();
base.Dispose(isDisposing);
}
[BackgroundDependencyLoader]
private void load()
{

View File

@ -62,7 +62,16 @@ namespace osu.Game.Tests.Visual
}
if (localStorage.IsValueCreated)
localStorage.Value.DeleteDirectory(".");
{
try
{
localStorage.Value.DeleteDirectory(".");
}
catch
{
// we don't really care if this fails; it will just leave folders lying around from test runs.
}
}
}
protected override ITestCaseTestRunner CreateRunner() => new OsuTestCaseTestRunner();