mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Access database recursively.
This commit is contained in:
@ -118,7 +118,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
||||
Action waitAction = () =>
|
||||
{
|
||||
while (!(resultSets = host.Dependencies.Get<BeatmapDatabase>()
|
||||
.Query<BeatmapSetInfo>().Where(s => s.OnlineBeatmapSetID == 241526)).Any())
|
||||
.GetAllWithChildren<BeatmapSetInfo>(s => s.OnlineBeatmapSetID == 241526)).Any())
|
||||
Thread.Sleep(50);
|
||||
};
|
||||
|
||||
@ -135,15 +135,14 @@ namespace osu.Game.Tests.Beatmaps.IO
|
||||
waitAction = () =>
|
||||
{
|
||||
while ((resultBeatmaps = host.Dependencies.Get<BeatmapDatabase>()
|
||||
.Query<BeatmapInfo>().Where(s => s.OnlineBeatmapSetID == 241526 && s.BaseDifficultyID > 0)).Count() != 12)
|
||||
.GetAllWithChildren<BeatmapInfo>(s => s.OnlineBeatmapSetID == 241526 && s.BaseDifficultyID > 0)).Count() != 12)
|
||||
Thread.Sleep(50);
|
||||
};
|
||||
|
||||
Assert.IsTrue(waitAction.BeginInvoke(null, null).AsyncWaitHandle.WaitOne(timeout),
|
||||
@"Beatmaps did not import to the database in allocated time");
|
||||
|
||||
//fetch children and check we can load from the post-storage path...
|
||||
var set = host.Dependencies.Get<BeatmapDatabase>().GetChildren(resultSets.First());
|
||||
var set = resultSets.First();
|
||||
|
||||
Assert.IsTrue(set.Beatmaps.Count == resultBeatmaps.Count(),
|
||||
$@"Incorrect database beatmap count post-import ({resultBeatmaps.Count()} but should be {set.Beatmaps.Count}).");
|
||||
|
Reference in New Issue
Block a user