mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Add test coverage of more advanced frame delivery scenarios to TestSceneSpectatorPlayback
This commit is contained in:
@ -30,6 +30,8 @@ namespace osu.Game.Tests.Visual.Spectator
|
||||
/// </summary>
|
||||
public bool ShouldFailSendingFrames { get; set; }
|
||||
|
||||
public int FrameSendAttempts { get; private set; }
|
||||
|
||||
public override IBindable<bool> IsConnected { get; } = new Bindable<bool>(true);
|
||||
|
||||
public IReadOnlyDictionary<int, ReplayFrame> LastReceivedUserFrames => lastReceivedUserFrames;
|
||||
@ -130,6 +132,8 @@ namespace osu.Game.Tests.Visual.Spectator
|
||||
|
||||
protected override Task SendFramesInternal(FrameDataBundle bundle)
|
||||
{
|
||||
FrameSendAttempts++;
|
||||
|
||||
if (ShouldFailSendingFrames)
|
||||
return Task.FromException(new InvalidOperationException());
|
||||
|
||||
|
Reference in New Issue
Block a user