1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 18:07:24 +08:00
osu-lazer/osu.Game/Tests
Dean Herbert bc557bacf0 Remove room null assertion in TestMultiplayerClient.ChangeState to avoid assert
This method is run from async contexts, but `get_Room` asserts update
thread which is not the case. Was causing silent test failures (showing
as pass but failing `dotnet-test` via return code):

TestSceneMultiplayer.TestGameplayFlow

```
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: Score preparation failed!
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: NUnit.Framework.AssertionException: :
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at osu.Framework.Logging.ThrowingTraceListener.Fail(String message1, String message2)
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at System.Diagnostics.TraceInternal.Fail(String message, String detailMessage)
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at System.Diagnostics.TraceInternal.TraceProvider.Fail(String message, String detailMessage)
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at System.Diagnostics.Debug.Fail(String message, String detailMessage)
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at osu.Game.Online.Multiplayer.MultiplayerClient.get_Room() in /opt/buildagent/work/ecd860037212ac52/osu.Game/Online/Multiplayer/MultiplayerClient.cs:line 98
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at osu.Game.Tests.Visual.Multiplayer.TestMultiplayerClient.ChangeState(MultiplayerUserState newState) in /opt/buildagent/work/ecd860037212ac52/osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs:line 275
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at osu.Game.Screens.OnlinePlay.Multiplayer.MultiplayerPlayer.PrepareScoreForResultsAsync(Score score) in /opt/buildagent/work/ecd860037212ac52/osu.Game/Screens/OnlinePlay/Multiplayer/MultiplayerPlayer.cs:line 223
[13:13:17] :         [dotnet test] [runtime] 2022-06-22 13:13:16 [error]: at osu.Game.Screens.Play.Player.prepareScoreForResults() in /opt/buildagent/work/ecd860037212ac52/osu.Game/Screens/Play/Player.cs:line 747
```
2022-06-23 14:10:20 +09:00
..
Beatmaps Automated #nullable processing 2022-06-17 16:37:17 +09:00
Gameplay Automated #nullable processing 2022-06-17 16:37:17 +09:00
Rulesets Automated #nullable processing 2022-06-17 16:37:17 +09:00
Visual Remove room null assertion in TestMultiplayerClient.ChangeState to avoid assert 2022-06-23 14:10:20 +09:00
CleanRunHeadlessGameHost.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
OsuTestBrowser.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00
VisualTestRunner.cs Automated #nullable processing 2022-06-17 16:37:17 +09:00