Ejemplo n.º 1
0
 private void ReturnRunner(VsTestRunner runner)
 {
     lock (_lck)
     {
         _availableRunners.Enqueue(runner);
         Monitor.Pulse(_lck);
     }
 }
Ejemplo n.º 2
0
        public VsTestRunnerPool(StrykerOptions options, OptimizationFlags flags, ProjectInfo projectInfo)
        {
            _flags = flags;
            using (var runner = new VsTestRunner(options, _flags, projectInfo, null, null))
            {
                _discoveredTests = runner.DiscoverTests();
            }

            Parallel.For(0, options.ConcurrentTestrunners, (i, loopState) =>
            {
                _availableRunners.Enqueue(new VsTestRunner(options, _flags, projectInfo, _discoveredTests, _coverage, helper: _helper));
            });
        }
Ejemplo n.º 3
0
        public VsTestRunnerPool(StrykerOptions options, ProjectInfo projectInfo)
        {
            IEnumerable <TestCase> testCases;

            using (var runner = new VsTestRunner(options, projectInfo, null))
            {
                testCases = runner.DiscoverTests();
            }

            for (var i = 0; i < options.ConcurrentTestrunners; i++)
            {
                _availableRunners.Add(new VsTestRunner(options, projectInfo, testCases.Count()));
            }
        }
Ejemplo n.º 4
0
        public VsTestRunnerPool(StrykerOptions options, OptimizationFlags flags, ProjectInfo projectInfo)
        {
            _logger = ApplicationLogging.LoggerFactory.CreateLogger <VsTestRunnerPool>();

            _flags = flags;
            using (var runner = new VsTestRunner(options, _flags, projectInfo, null, null))
            {
                _discoveredTests = runner.DiscoverTests();
            }

            Parallel.For(0, options.ConcurrentTestrunners, (i, loopState) =>
            {
                _availableRunners.Add(new VsTestRunner(options, _flags, projectInfo, _discoveredTests, CoverageMutants, helper: _helper));
            });
        }
Ejemplo n.º 5
0
 private void ReturnRunner(VsTestRunner runner)
 {
     _availableRunners.Add(runner);
     _runnerAvailableHandler.Set();
 }