mirror of
https://github.com/ppy/osu
synced 2024-12-14 19:06:07 +00:00
Merge pull request #1176 from peppy/fix-unit-tests
Fix unit tests causing regular crashes
This commit is contained in:
commit
cc10eba178
@ -1 +1 @@
|
||||
Subproject commit 74f644bad039606e242d8782014d8c249a38b6a3
|
||||
Subproject commit e2d41820b3795d97f8510a18fad5e42caeb23f0a
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user