mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 16:52:55 +08:00
Query test assert conditions less often
This commit is contained in:
parent
ac4b2797dc
commit
00be98dba7
@ -155,7 +155,7 @@ namespace osu.Game.Tests.Beatmaps.IO
|
|||||||
|
|
||||||
private void waitForOrAssert(Func<bool> result, string failureMessage, int timeout = 60000)
|
private void waitForOrAssert(Func<bool> result, string failureMessage, int timeout = 60000)
|
||||||
{
|
{
|
||||||
Action waitAction = () => { while (!result()) Thread.Sleep(20); };
|
Action waitAction = () => { while (!result()) Thread.Sleep(200); };
|
||||||
Assert.IsTrue(waitAction.BeginInvoke(null, null).AsyncWaitHandle.WaitOne(timeout), failureMessage);
|
Assert.IsTrue(waitAction.BeginInvoke(null, null).AsyncWaitHandle.WaitOne(timeout), failureMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user