1
0
mirror of https://github.com/ppy/osu.git synced 2026-05-20 17:29:54 +08:00

Merge pull request #1176 from peppy/fix-unit-tests

Fix unit tests causing regular crashes
This commit is contained in:
Dan Balasescu
2017-08-23 15:22:06 +09:00
committed by GitHub
Unverified
2 changed files with 3 additions and 6 deletions
@@ -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<RulesetStore>().Reset();
osu.Dependencies.Get<BeatmapManager>().Reset();
return osu;
}