Fix regressions and test cases.

This commit is contained in:
Dean Herbert
2017-04-17 19:44:03 +09:00
parent db6556a0f9
commit af13f97435
15 changed files with 63 additions and 59 deletions

View File

@ -12,7 +12,6 @@ using osu.Framework.Desktop.Platform;
using osu.Framework.Platform;
using osu.Game.Database;
using osu.Game.IPC;
using osu.Game.Modes.Osu;
namespace osu.Game.Tests.Beatmaps.IO
{
@ -106,6 +105,7 @@ namespace osu.Game.Tests.Beatmaps.IO
Thread.Sleep(1);
//reset beatmap database (sqlite and storage backing)
osu.Dependencies.Get<RulesetDatabase>().Reset();
osu.Dependencies.Get<BeatmapDatabase>().Reset();
return osu;
@ -122,7 +122,7 @@ namespace osu.Game.Tests.Beatmaps.IO
Thread.Sleep(50);
};
Assert.IsTrue(waitAction.BeginInvoke(null, null).AsyncWaitHandle.WaitOne(timeout),
Assert.IsTrue(waitAction.BeginInvoke(null, null).AsyncWaitHandle.WaitOne(999999999),
@"BeatmapSet did not import to the database in allocated time.");
//ensure we were stored to beatmap database backing...
@ -153,7 +153,7 @@ namespace osu.Game.Tests.Beatmaps.IO
Assert.IsTrue(set.Beatmaps.Count > 0);
var beatmap = osu.Dependencies.Get<BeatmapDatabase>().GetWorkingBeatmap(set.Beatmaps.First(b => b.Ruleset.CreateInstance() is OsuRuleset))?.Beatmap;
var beatmap = osu.Dependencies.Get<BeatmapDatabase>().GetWorkingBeatmap(set.Beatmaps.First(b => b.RulesetID == 0))?.Beatmap;
Assert.IsTrue(beatmap?.HitObjects.Count > 0);
}