1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-15 01:52:55 +08:00

Merge pull request #11780 from peppy/fix-tournament-test-failures

Ensure the tournament test runner is ready before performing the test run
This commit is contained in:
Dan Balasescu 2021-02-15 16:05:33 +09:00 committed by GitHub
commit dffccef1f0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.
using System.Linq;
using System.Threading;
using osu.Framework.Allocation;
using osu.Framework.Platform;
using osu.Framework.Testing;
@ -163,7 +164,13 @@ namespace osu.Game.Tournament.Tests
}));
}
public void RunTestBlocking(TestScene test) => runner.RunTestBlocking(test);
public void RunTestBlocking(TestScene test)
{
while (runner?.IsLoaded != true && Host.ExecutionState == ExecutionState.Running)
Thread.Sleep(10);
runner?.RunTestBlocking(test);
}
}
}
}