THE RETURN OF THE KING

This reverts commit c18d07538a.
This commit is contained in:
DrSmugleaf
2021-11-22 19:08:27 +01:00
parent 14e342663e
commit c3fe5909ad
65 changed files with 7021 additions and 236 deletions

View File

@@ -318,13 +318,19 @@ namespace Content.IntegrationTests
protected async Task WaitUntil(IntegrationInstance instance, Func<bool> func, int maxTicks = 600,
int tickStep = 1)
{
await WaitUntil(instance, async () => await Task.FromResult(func()), maxTicks);
}
protected async Task WaitUntil(IntegrationInstance instance, Func<Task<bool>> func, int maxTicks = 600,
int tickStep = 1)
{
var ticksAwaited = 0;
bool passed;
await instance.WaitIdleAsync();
while (!(passed = func()) && ticksAwaited < maxTicks)
while (!(passed = await func()) && ticksAwaited < maxTicks)
{
var ticksToRun = tickStep;