Skip to content

Commit

Permalink
Add a fake load to visual test to restore previous testing behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
peppy committed Jan 18, 2024
1 parent a7130f1 commit 5295eb6
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion osu.Game.Tests/Visual/Gameplay/TestSceneSongProgress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

using System;
using System.Linq;
using System.Threading;
using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Extensions.IEnumerableExtensions;
Expand Down Expand Up @@ -45,14 +46,26 @@ private void load()
},
gameplayClockContainer = new MasterGameplayClockContainer(Beatmap.Value, skip_target_time)
{
Child = frameStabilityContainer = new FrameStabilityContainer()
Child = frameStabilityContainer = new FrameStabilityContainer
{
Child = new FakeLoad()
}
}
});

Dependencies.CacheAs<IGameplayClock>(gameplayClockContainer);
Dependencies.CacheAs<IFrameStableClock>(frameStabilityContainer);
}

private partial class FakeLoad : Drawable
{
protected override void Update()
{
base.Update();
Thread.Sleep(1);
}
}

[SetUpSteps]
public void SetupSteps()
{
Expand Down

0 comments on commit 5295eb6

Please sign in to comment.