Exemplo n.º 1
0
        public static void WithinTimeout(this TestKit @this, Action act)
        {
            // Double timeout as some tests need to wait for time out for the TestLatch to throw
            TimeSpan span = @this.Dilated(@this.GetTimeoutDoubled());

            if (!Task.Run(act).Wait(span))
            {
                throw new TimeoutException();
            }
        }