Пример #1
0
        private void WaitForCommandAvailable(Command cmd, TimeSpan timeout)
        {
            var stopWatch = new Stopwatch();

            stopWatch.Start();
            while (stopWatch.Elapsed < timeout)
            {
                if (cmd.IsAvailable)
                {
                    return;
                }
                System.Threading.Thread.Sleep(250);
            }

            XunitLogger.LogWarning($"Timed out waiting for {cmd.Name} to be available");
        }