提交 3f20333e 编写于 作者: M Manish Vasani

Fix integration tests

上级 4c66dd81
......@@ -280,7 +280,7 @@ Namespace Microsoft.CodeAnalysis.Editor.Implementation.Diagnostics.UnitTests
If Not enabled Then
workspace.Options = workspace.Options _
.WithChangedOption(ServiceComponentOnOffOptions.DiagnosticProvider, False) _
.WithChangedOption(SolutionCrawlerOptions.BackgroundAnalysisScopeOption, BackgroundAnalysisScope.OpenFilesAndProjects)
.WithChangedOption(SolutionCrawlerOptions.BackgroundAnalysisScopeOption, BackgroundAnalysisScope.Default)
End If
Dim registrationService = workspace.Services.GetService(Of ISolutionCrawlerRegistrationService)()
......
......@@ -82,7 +82,7 @@ internal static Options Create(string[] args)
string logFileName = null;
string profileRoot = null;
var usePersistentStorage = false;
var analysisScope = BackgroundAnalysisScope.OpenFilesAndProjects;
var analysisScope = BackgroundAnalysisScope.Default;
var incrementalAnalyzerNames = ImmutableList.CreateBuilder<string>();
int i = 0;
......
......@@ -4,6 +4,7 @@
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.Host;
using Microsoft.CodeAnalysis.Shared.TestHooks;
using Microsoft.CodeAnalysis.SolutionCrawler;
using Microsoft.VisualStudio.IntegrationTest.Utilities.InProcess;
namespace Microsoft.VisualStudio.IntegrationTest.Utilities.OutOfProcess
......@@ -72,17 +73,10 @@ public void SetImportCompletionOption(bool value)
public void SetFullSolutionAnalysis(bool value)
{
SetPerLanguageOption(
optionName: "Closed File Diagnostic",
feature: "ServiceFeaturesOnOff",
language: LanguageNames.CSharp,
value: value ? "true" : "false");
SetPerLanguageOption(
optionName: "Closed File Diagnostic",
feature: "ServiceFeaturesOnOff",
language: LanguageNames.VisualBasic,
value: value ? "true" : "false");
SetOption(
optionName: SolutionCrawlerOptions.BackgroundAnalysisScopeOption.Name,
feature: SolutionCrawlerOptions.BackgroundAnalysisScopeOption.Feature,
value: value ? BackgroundAnalysisScope.FullSolution : BackgroundAnalysisScope.Default);
}
public void SetFeatureOption(string feature, string optionName, string language, string valueString)
......
......@@ -9,5 +9,6 @@ internal enum BackgroundAnalysisScope
FullSolution,
Minimal = ActiveFile,
Default = OpenFilesAndProjects,
}
}
......@@ -10,8 +10,8 @@ internal static class SolutionCrawlerOptions
/// Option to turn configure background analysis scope.
/// </summary>
public static readonly Option<BackgroundAnalysisScope> BackgroundAnalysisScopeOption = new Option<BackgroundAnalysisScope>(
nameof(SolutionCrawlerOptions), nameof(BackgroundAnalysisScopeOption), defaultValue: BackgroundAnalysisScope.OpenFilesAndProjects,
storageLocations: new RoamingProfileStorageLocation($"Options.BackgroundAnalysisScopeOption"));
nameof(SolutionCrawlerOptions), nameof(BackgroundAnalysisScopeOption), defaultValue: BackgroundAnalysisScope.Default,
storageLocations: new RoamingProfileStorageLocation($"TextEditor.BackgroundAnalysisScopeOption"));
/// <summary>
/// Enables forced <see cref="BackgroundAnalysisScope.Minimal"/> scope when low VM is detected to improve performance.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册