Fix some regressing behaviour due to CleanRunHeadlessGameHost's naming structure changing

This commit is contained in:
Dean Herbert
2021-12-24 20:24:37 +09:00
parent be02c3f9f8
commit 1c0dc204c4
3 changed files with 13 additions and 7 deletions

View File

@ -128,8 +128,12 @@ namespace osu.Game.Tests.Collections.IO
[Test]
public async Task TestSaveAndReload()
{
using (HeadlessGameHost host = new CleanRunHeadlessGameHost(bypassCleanup: true))
string firstRunName;
using (var host = new CleanRunHeadlessGameHost(bypassCleanup: true))
{
firstRunName = host.Name;
try
{
var osu = LoadOsuIntoHost(host, true);
@ -150,7 +154,7 @@ namespace osu.Game.Tests.Collections.IO
}
// Name matches the automatically chosen name from `CleanRunHeadlessGameHost` above, so we end up using the same storage location.
using (HeadlessGameHost host = new TestRunHeadlessGameHost(nameof(TestSaveAndReload)))
using (HeadlessGameHost host = new TestRunHeadlessGameHost(firstRunName))
{
try
{