Fix test failures due to logger pollution

As seen at
https://github.com/ppy/osu/pull/13831/checks?check_run_id=3025050307. I
can't confirm that this will fix the issue but it looks like the only
plausible reason. I have confirmed that the logging is not coming from
the local (first logging is guaranteed to be after `SetupForRun`).
This commit is contained in:
Dean Herbert 2021-07-09 12:15:28 +09:00
parent dbfeea9880
commit 9f7c6adb58

View File

@ -25,8 +25,11 @@ namespace osu.Game.Tests
protected override void SetupForRun()
{
base.SetupForRun();
Storage.DeleteDirectory(string.Empty);
// base call needs to be run *after* storage is emptied, as it updates the (static) logger's storage and may start writing
// log entries from another source if a unit test host is shared over multiple tests, causing a file access denied exception.
base.SetupForRun();
}
}
}