Skip to content

Commit

Permalink
More hardening of TestMultiplayerClient to attempt to fix test fail…
Browse files Browse the repository at this point in the history
…ures
  • Loading branch information
peppy committed Aug 18, 2024
1 parent 07929b4 commit e75ae4a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions osu.Game/Tests/Visual/Multiplayer/TestMultiplayerClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ public void ChangeUserBeatmapAvailability(int userId, BeatmapAvailability newBea

protected override async Task<MultiplayerRoom> JoinRoom(long roomId, string? password = null)
{
if (RoomJoined || ServerAPIRoom != null)
throw new InvalidOperationException("Already joined a room");

roomId = clone(roomId);
password = clone(password);

Expand Down Expand Up @@ -260,6 +263,8 @@ protected override void OnRoomJoined()
protected override Task LeaveRoomInternal()
{
RoomJoined = false;
ServerAPIRoom = null;
ServerRoom = null;
return Task.CompletedTask;
}

Expand Down

0 comments on commit e75ae4a

Please sign in to comment.