mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 04:02:57 +08:00
Migrate beatmap carousel test to AddUntilStep
Due to non-deterministic test failures in TestSceneBeatmapCarousel, migrate the checkSelected helper step from AddAssert to AddUntilStep. This adds more leniency for performance-related issues while still checking the desired behaviour.
This commit is contained in:
parent
bfa858c663
commit
2487d4f0f2
@ -83,7 +83,7 @@ namespace osu.Game.Tests.Visual.SongSelect
|
||||
AddAssert("ensure prev random fetch worked", () => selectedSets.Peek() == carousel.SelectedBeatmapSet);
|
||||
|
||||
private void checkSelected(int set, int? diff = null) =>
|
||||
AddAssert($"selected is set{set}{(diff.HasValue ? $" diff{diff.Value}" : "")}", () =>
|
||||
AddUntilStep($"selected is set{set}{(diff.HasValue ? $" diff{diff.Value}" : "")}", () =>
|
||||
{
|
||||
if (diff != null)
|
||||
return carousel.SelectedBeatmap == carousel.BeatmapSets.Skip(set - 1).First().Beatmaps.Skip(diff.Value - 1).First();
|
||||
|
Loading…
Reference in New Issue
Block a user