1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-06 08:22:56 +08:00

Fix potential failure during cleanup of files in migration tests

This commit is contained in:
Dean Herbert 2021-07-06 15:08:00 +09:00
parent 2cd1bde2bf
commit 7f7cf0b927

View File

@ -20,7 +20,7 @@ namespace osu.Game.Tournament.Tests.NonVisual
[Test] [Test]
public void TestDefaultDirectory() public void TestDefaultDirectory()
{ {
using (HeadlessGameHost host = new CleanRunHeadlessGameHost()) using (HeadlessGameHost host = new CleanRunHeadlessGameHost(nameof(TestDefaultDirectory)))
{ {
try try
{ {
@ -139,8 +139,13 @@ namespace osu.Game.Tournament.Tests.NonVisual
} }
finally finally
{ {
host.Storage.Delete("tournament.ini"); try
host.Storage.DeleteDirectory("tournaments"); {
host.Storage.Delete("tournament.ini");
host.Storage.DeleteDirectory("tournaments");
}
catch { }
host.Exit(); host.Exit();
} }
} }