From ea400a9db770fd93bc5ff3cab43ab8f7e82722f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Tue, 10 Oct 2023 09:30:51 +0200 Subject: [PATCH] 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. --- .../Visual/Gameplay/TestScenePlayerLocalScoreImport.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLocalScoreImport.cs b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLocalScoreImport.cs index 8e21c3ea9f..1254aa0639 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLocalScoreImport.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestScenePlayerLocalScoreImport.cs @@ -102,6 +102,7 @@ public void TestLastPlayedUpdated() { DateTimeOffset? getLastPlayed() => Realm.Run(r => r.Find(Beatmap.Value.BeatmapInfo.ID)?.LastPlayed); + AddStep("reset last played", () => Realm.Write(r => r.Find(Beatmap.Value.BeatmapInfo.ID)!.LastPlayed = null)); AddAssert("last played is null", () => getLastPlayed() == null); CreateTest();