mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 03:22:54 +08:00
Fix cross-test interference
`TestLastPlayedUpdated` was implicitly relying on running first. `TestGuestScoreIsStoredAsGuest` showing up changed test ordering, causing the former test to fail if it didn't get to run first.
This commit is contained in:
parent
24956588e9
commit
ea400a9db7
@ -102,6 +102,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
{
|
{
|
||||||
DateTimeOffset? getLastPlayed() => Realm.Run(r => r.Find<BeatmapInfo>(Beatmap.Value.BeatmapInfo.ID)?.LastPlayed);
|
DateTimeOffset? getLastPlayed() => Realm.Run(r => r.Find<BeatmapInfo>(Beatmap.Value.BeatmapInfo.ID)?.LastPlayed);
|
||||||
|
|
||||||
|
AddStep("reset last played", () => Realm.Write(r => r.Find<BeatmapInfo>(Beatmap.Value.BeatmapInfo.ID)!.LastPlayed = null));
|
||||||
AddAssert("last played is null", () => getLastPlayed() == null);
|
AddAssert("last played is null", () => getLastPlayed() == null);
|
||||||
|
|
||||||
CreateTest();
|
CreateTest();
|
||||||
|
Loading…
Reference in New Issue
Block a user