private void ReturnRunner(VsTestRunner runner) { lock (_lck) { _availableRunners.Enqueue(runner); Monitor.Pulse(_lck); } }
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)); }); }
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())); } }
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)); }); }
private void ReturnRunner(VsTestRunner runner) { _availableRunners.Add(runner); _runnerAvailableHandler.Set(); }