示例#1
0
        public async Task StressOpenCloseSln()
        {
            try
            {
                // the only change to existing test required: call to static method
                await StressUtil.DoIterationsAsync(this, stressUtilOptions : new StressUtilOptions()
                {
                    FailTestAsifLeaksFound             = true,
                    NumIterations                      = 17,
                    actExecuteAfterEveryIterationAsync = async(nIter, measurementHolder) =>
                    {
                        await Task.Yield();
                        return(true); //do the default action after iteration of checking iteration number and taking dumps, comparing.
                    }
                });

                await _VSHandler.OpenSolution(SolutionToLoad);

                await _VSHandler.CloseSolution();
            }
            catch (Exception ex)
            {
                logger.LogMessage($"Exception {ex}");
                throw;
            }
        }
        public async Task StressMemSpectOpenCloseSln()
        {
            try
            {
                // 30 min for 7 iter
                await StressUtil.DoIterationsAsync(this, new StressUtilOptions()
                {
                    ShowUI = true, NumIterations = 3
                });

                await _VSHandler.OpenSolution(StressVS.SolutionToLoad);

                await _VSHandler.CloseSolution();
            }
            catch (Exception ex)
            {
                logger.LogMessage($"Exception {ex}");
                throw;
            }
        }