-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Have code action tests run in OOP mode by default #73372
Conversation
internal partial class SerializerService | ||
{ | ||
[DebuggerDisplay("{" + nameof(Display) + ",nq}")] | ||
private sealed class SerializedMetadataReference : PortableExecutableReference, ISupportTemporaryStorage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just an extrac of a class. no changes to it at all.
@ToddGrun ptal |
if (analyzer != null) | ||
{ | ||
Contract.ThrowIfTrue(parameters.testHost == TestHost.OutOfProcess, $"Out-of-proc testing is not supported since {analyzer} can't be serialized."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
instead of asserting and not allowing this. We just make it so AnalyzerImageReference do work in OOP when in test scenarios.
@@ -102,24 +103,21 @@ internal override Task<CodeRefactoring> GetCodeRefactoringAsync(TestWorkspace wo | |||
|
|||
protected static void AddAnalyzerToWorkspace(Workspace workspace, DiagnosticAnalyzer analyzer, TestParameters parameters) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no clue why this method is duplicated. not interested in fixing that right now :)
@@ -166,7 +166,7 @@ public InProcRemoteServices(SolutionServices workspaceServices, TraceListener? t | |||
{ | |||
var remoteLogger = new TraceSource("InProcRemoteClient") | |||
{ | |||
Switch = { Level = SourceLevels.Verbose }, | |||
Switch = { Level = SourceLevels.Off }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
needed to change this because the amount of cost of this logging, over the stdout pipe which xunit captures, was actually slowing down tests too much! =-o
var guid = reader.ReadGuid(); | ||
lock (s_analyzerImageReferenceMapGate) | ||
{ | ||
Contract.ThrowIfFalse(s_analyzerImageReferenceMap.TryGetKey(guid, out var analyzerImageReference)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
will do!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in e035fc7
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jasonmalinowski For review when you get back. |
This is the mode users run in, and we want to verify that any work they do that involves communicating with OOP are tested by our standard unit tests.