Skip to content
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

Mitigate memory leak and disable affected tests #761

Merged
merged 1 commit into from
Feb 21, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,8 @@ public class C

#endregion

[Fact]
[Fact(Skip = "GitHub Issue 759")]
[WorkItem(759)]
public void AnalyzerDriverIsSafeAgainstAnalyzerExceptions()
{
var compilation = CreateCompilationWithMscorlib45(TestResource.AllInOneCSharpCode, parseOptions: TestOptions.Regular);
Expand Down
6 changes: 4 additions & 2 deletions src/Compilers/Core/AnalyzerDriver/AnalyzerDriverHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,8 @@ internal static EventHandler<AnalyzerExceptionDiagnosticArgs> RegisterAnalyzerEx
}
};

AnalyzerExceptionDiagnostic += handler;
// TODO: re-enable once bug 759 is fixed
// AnalyzerExceptionDiagnostic += handler;
return handler;
}

Expand All @@ -529,7 +530,8 @@ internal static EventHandler<AnalyzerExceptionDiagnosticArgs> RegisterAnalyzerEx
}
};

AnalyzerExceptionDiagnostic += handler;
// TODO: re-enable once bug 759 is fixed
// AnalyzerExceptionDiagnostic += handler;
return handler;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ End Enum
CreateCompilationWithMscorlib(source).VerifyAnalyzerDiagnostics({New BasicTrackingDiagnosticAnalyzer()})
End Sub

<Fact>
<Fact(Skip:="GitHub Issue 759")>
<WorkItem(759)>
Public Sub AnalyzerDriverIsSafeAgainstAnalyzerExceptions()
Dim compilation = CreateCompilationWithMscorlib({TestResource.AllInOneVisualBasicCode})
ThrowingDiagnosticAnalyzer(Of SyntaxKind).VerifyAnalyzerEngineIsSafeAgainstExceptions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ protected override DiagnosticAnalyzer GetCSharpDiagnosticAnalyzer()
return new ExceptionThrowingSymbolAnalyzer_ThrowSymbolKindsOfInterest();
}

[Fact, Trait(Traits.Feature, Traits.Features.Diagnostics)]
[Fact(Skip = "GitHub Issue 759"), Trait(Traits.Feature, Traits.Features.Diagnostics)]
[WorkItem(759)]
public void TestTypeParameterNamesCSharp()
{
var source = @"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ class C
}
}

[Fact]
[Fact(Skip = "GitHub Issue 759")]
[WorkItem(759)]
public void DiagnosticAnalyzerDriverIsSafeAgainstAnalyzerExceptions()
{
var source = TestResource.AllInOneCSharpCode;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,8 @@ Namespace Microsoft.CodeAnalysis.Editor.Implementation.Diagnostics.UnitTests
End Using
End Sub

<Fact, WorkItem(937915), Trait(Traits.Feature, Traits.Features.Diagnostics)>
<Fact(Skip:="GitHub Issue 759"), WorkItem(937915), Trait(Traits.Feature, Traits.Features.Diagnostics)>
<WorkItem(759)>
Public Sub TestDiagnosticAnalyzerExceptionHandledGracefully2()
Dim test = <Workspace>
<Project Language="C#" CommonReferences="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ End Class
End Using
End Sub

<Fact>
<Fact(Skip:="GitHub Issue 759")>
<WorkItem(759)>
Public Sub DiagnosticAnalyzerDriverIsSafeAgainstAnalyzerExceptions()
Dim source = TestResource.AllInOneVisualBasicCode
Using Workspace = VisualBasicWorkspaceFactory.CreateWorkspaceFromFile(source)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,15 @@ internal abstract partial class AbstractHostDiagnosticUpdateSource
protected AbstractHostDiagnosticUpdateSource()
{
// Register for exception diagnostics from workspace's analyzer manager.
AnalyzerExceptionDiagnostic += OnAnalyzerExceptionDiagnostic;
// TODO: re-enable once bug 759 is fixed
// AnalyzerExceptionDiagnostic += OnAnalyzerExceptionDiagnostic;
}

~AbstractHostDiagnosticUpdateSource()
{
// Unregister for exception diagnostics from workspace's analyzer manager.
AnalyzerExceptionDiagnostic -= OnAnalyzerExceptionDiagnostic;
// TODO: re-enable once bug 759 is fixed
// AnalyzerExceptionDiagnostic -= OnAnalyzerExceptionDiagnostic;
}

internal static EventHandler<AnalyzerExceptionDiagnosticArgs> RegisterAnalyzerExceptionDiagnosticHandler(ImmutableArray<DiagnosticAnalyzer> analyzers, Workspace workspace)
Expand Down