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
commit cc10eba178
2 changed files with 3 additions and 6 deletions

@ -1 +1 @@
Subproject commit 74f644bad039606e242d8782014d8c249a38b6a3
Subproject commit e2d41820b3795d97f8510a18fad5e42caeb23f0a

View File

@ -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;
}