Ensure the tournament test runner is ready before performing the test run

This commit is contained in:
Dean Herbert 2021-02-15 15:31:51 +09:00
parent 2d158adcc1
commit 83183a84da
1 changed files with 8 additions and 1 deletions

View File

@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using System.Linq; using System.Linq;
using System.Threading;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Framework.Testing; using osu.Framework.Testing;
@ -163,7 +164,13 @@ protected override void LoadAsyncComplete()
})); }));
} }
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);
}
} }
} }
} }