Prevent removal of expired items in TestMultiplayerClient

This commit is contained in:
Dan Balasescu 2021-12-09 04:12:24 +09:00
parent 8398f86440
commit 4df2047a58

View File

@ -361,6 +361,9 @@ namespace osu.Game.Tests.Visual.Multiplayer
if (item.OwnerID != userId)
throw new InvalidOperationException("Attempted to remove an item which is not owned by the user.");
if (item.Expired)
throw new InvalidOperationException("Attempted to remove an item which has already been played");
serverSidePlaylist.Remove(item);
await ((IMultiplayerClient)this).PlaylistItemRemoved(playlistItemId).ConfigureAwait(false);