mirror of https://github.com/ppy/osu
Merge pull request #3103 from peppy/fix-testing-regression
Fix fatal test result on temporary file deletion failures
This commit is contained in:
commit
9dc55688d2
|
@ -54,6 +54,12 @@ private class TestSongSelect : PlaySongSelect
|
|||
public new BeatmapCarousel Carousel => base.Carousel;
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
factory.ResetDatabase();
|
||||
base.Dispose(isDisposing);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load()
|
||||
{
|
||||
|
|
|
@ -62,8 +62,17 @@ protected override void Dispose(bool isDisposing)
|
|||
}
|
||||
|
||||
if (localStorage.IsValueCreated)
|
||||
{
|
||||
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();
|
||||
|
||||
|
|
Loading…
Reference in New Issue