public void RunSensitivityPerfTests()
        {
            // The test could fail with "too fast" warning, it's ok
            var overrideConfig = CompetitionHelpers.CreateConfig(GetType()).WithReportWarningsAsErrors(false);

            Competition.Run(this, overrideConfig);
        }
Пример #2
0
        public static void CompetitionTooSlowOk()
        {
            var overrideConfig = CompetitionHelpers
                                 .CreateConfig(typeof(TooSlowBenchmark))
                                 .WithLongRunningBenchmarkLimit(TimeSpan.FromMinutes(2));

            var runState = SelfTestCompetition.Run <TooSlowBenchmark>(overrideConfig);
            var messages = runState.GetMessages();
            var summary  = runState.LastRunSummary;

            Assert.AreEqual(summary?.ValidationErrors.Length, 0);
            Assert.AreEqual(runState.RunNumber, 1);
            Assert.AreEqual(runState.RunsLeft, 0);
            Assert.AreEqual(runState.RunLimitExceeded, false);
            Assert.AreEqual(runState.LooksLikeLastRun, true);
            Assert.AreEqual(messages.Length, 0);
        }