From c5d6b6ea8d05578cfac4ae8697f15e37d8d84da3 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Tue, 20 Apr 2021 18:41:09 +0900 Subject: [PATCH] Fix tests failing intermittently This was due to this code happening in UpdateAfterChildren(), after the GCC has processed one frame. During this time, the clock could have advanced an arbitrary amount. The cause of this is the removal of the Task.Run() to set the clock in Restart() (now called Reset()) which changed the timing, so it only worked before due to pure luck. --- osu.Game.Tests/Visual/Gameplay/TestSceneLeadIn.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/osu.Game.Tests/Visual/Gameplay/TestSceneLeadIn.cs b/osu.Game.Tests/Visual/Gameplay/TestSceneLeadIn.cs index dccde366c2..f5f17a0bc1 100644 --- a/osu.Game.Tests/Visual/Gameplay/TestSceneLeadIn.cs +++ b/osu.Game.Tests/Visual/Gameplay/TestSceneLeadIn.cs @@ -130,9 +130,9 @@ namespace osu.Game.Tests.Visual.Gameplay public double GameplayClockTime => GameplayClockContainer.GameplayClock.CurrentTime; - protected override void UpdateAfterChildren() + protected override void Update() { - base.UpdateAfterChildren(); + base.Update(); if (!FirstFrameClockTime.HasValue) {