1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-14 08:23:00 +08:00

Add more missing realm Refresh() calls to new beatmap import tests

As noticed at https://github.com/ppy/osu/runs/7605101313?check_suite_focus=true
This commit is contained in:
Dean Herbert 2022-08-01 17:06:45 +09:00
parent 5335d60748
commit ee68113913

View File

@ -702,6 +702,8 @@ namespace osu.Game.Tests.Database
var firstImport = await importer.Import(new ImportTask(pathMissingOneBeatmap));
Assert.That(firstImport, Is.Not.Null);
realm.Run(r => r.Refresh());
Assert.That(realm.Realm.All<BeatmapSetInfo>().Where(s => !s.DeletePending), Has.Count.EqualTo(1));
Assert.That(realm.Realm.All<BeatmapSetInfo>().First(s => !s.DeletePending).Beatmaps, Has.Count.EqualTo(11));
@ -709,6 +711,8 @@ namespace osu.Game.Tests.Database
var secondImport = await importer.Import(new ImportTask(pathOriginal));
Assert.That(secondImport, Is.Not.Null);
realm.Run(r => r.Refresh());
Assert.That(realm.Realm.All<BeatmapInfo>(), Has.Count.EqualTo(23));
Assert.That(realm.Realm.All<BeatmapSetInfo>(), Has.Count.EqualTo(2));