public void Check(IProbe probe) { var timeout = new Timeout(_timeoutMillis); while (!probe.IsSatisfied) { if (timeout.HasTimedOut()) { Assert.Fail(DescribeFailureOf(probe)); } Thread.Sleep(_pollDelayMillis); probe.Sample(); } }
public void Check(IProbe probe) { var timeout = new Timeout(timeoutMillis); while (!probe.IsSatisfied()) { if (timeout.HasTimedOut()) { throw new AssertionException("Failure to complete the assertion (acceptance ctr + error message)"); } Task.Delay(pollDelayMillis).Wait(); probe.Sample(); } }