1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 06:03:08 +08:00

Fix intermittent test failures due to randomised score statistics

This commit is contained in:
Dean Herbert 2022-07-15 17:39:08 +09:00
parent c8c79d2185
commit 4b253f83c3

View File

@ -274,14 +274,18 @@ namespace osu.Game.Tests.Visual.Online
} }
}; };
const int initial_great_count = 2000;
int greatCount = initial_great_count;
foreach (var s in scores.Scores) foreach (var s in scores.Scores)
{ {
s.Statistics = new Dictionary<HitResult, int> s.Statistics = new Dictionary<HitResult, int>
{ {
{ HitResult.Great, RNG.Next(2000) }, { HitResult.Great, greatCount -= 100 },
{ HitResult.Ok, RNG.Next(2000) }, { HitResult.Ok, RNG.Next(100) },
{ HitResult.Meh, RNG.Next(2000) }, { HitResult.Meh, RNG.Next(100) },
{ HitResult.Miss, RNG.Next(2000) } { HitResult.Miss, initial_great_count - greatCount }
}; };
} }