1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 13:37:25 +08:00

More hardening of TestMultiplayerClient to attempt to fix test failures

This commit is contained in:
Dean Herbert 2024-08-19 04:04:24 +09:00
parent 07929b440a
commit e75ae4a37b
No known key found for this signature in database

View File

@ -208,6 +208,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
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);
@ -260,6 +263,8 @@ namespace osu.Game.Tests.Visual.Multiplayer
protected override Task LeaveRoomInternal()
{
RoomJoined = false;
ServerAPIRoom = null;
ServerRoom = null;
return Task.CompletedTask;
}