From e777ccc3398a155b33423bf3f056d8d075142368 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 23 Aug 2017 14:38:26 +0900 Subject: [PATCH] Avoid threading conflicts when resetting the database in unit tests --- osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index ecaf0db096..eb456d7a63 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -13,7 +13,6 @@ using osu.Framework.Platform; using osu.Game.IPC; using osu.Framework.Allocation; using osu.Game.Beatmaps; -using osu.Game.Rulesets; namespace osu.Game.Tests.Beatmaps.IO { @@ -98,16 +97,14 @@ namespace osu.Game.Tests.Beatmaps.IO private OsuGameBase loadOsu(GameHost host) { + host.Storage.DeleteDatabase(@"client"); + var osu = new OsuGameBase(); Task.Run(() => host.Run(osu)); while (!osu.IsLoaded) Thread.Sleep(1); - //reset beatmap database (sqlite and storage backing) - osu.Dependencies.Get().Reset(); - osu.Dependencies.Get().Reset(); - return osu; }