Skip to content

Commit

Permalink
feat: configurable wait time for tests (#729)
Browse files Browse the repository at this point in the history
* feat: configurable wait time for tests

* simplify with default value
  • Loading branch information
uweeby committed Mar 27, 2021
1 parent c31542b commit b10f3e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Assets/Tests/Common/AsyncUtil.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ namespace Mirage.Tests
public static class AsyncUtil
{

public static UniTask WaitUntilWithTimeout(Func<bool> predicate)
public static UniTask WaitUntilWithTimeout(Func<bool> predicate, double seconds = 2)
{
return UniTask.WaitUntil(predicate).Timeout(TimeSpan.FromSeconds(2));
return UniTask.WaitUntil(predicate).Timeout(TimeSpan.FromSeconds(seconds));
}

// Unity's nunit does not support async tests
Expand Down

0 comments on commit b10f3e8

Please sign in to comment.