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

Delete test which is unrelated to the analyzer of interest #4853

Merged
merged 1 commit into from
Feb 16, 2021

Conversation

sharwell
Copy link
Member

Closes #4544

@sharwell sharwell requested a review from a team as a code owner February 16, 2021 16:04
[Fact, WorkItem(1671, "https://github.com/dotnet/roslyn-analyzers/issues/1671")]
public async Task ErrorCase_NoDiagnostic()
{
// Missing "using System;" causes "Equals" method be marked as IsOverride but with null OverriddenMethod.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment makes me think that this case used to cause a crash.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most likely, this tests the following code path:

containingMethod.OverriddenMethod == null ||
containingMethod.OverriddenMethod.IsAbstract)

Copy link
Member Author

@sharwell sharwell Feb 16, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment makes me think that this case used to cause a crash

It may have, but not in this analyzer.

Most likely, this tests the following code path:

We have other tests covering the same path (all tests that contain methods not marked override).

@codecov
Copy link

codecov bot commented Feb 16, 2021

Codecov Report

Merging #4853 (d06c2fb) into master (181a4b5) will increase coverage by 95.62%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##           master    #4853       +/-   ##
===========================================
+ Coverage        0   95.62%   +95.62%     
===========================================
  Files           0     1177     +1177     
  Lines           0   269379   +269379     
  Branches        0    16258    +16258     
===========================================
+ Hits            0   257600   +257600     
- Misses          0     9677     +9677     
- Partials        0     2102     +2102     

@Youssef1313
Copy link
Member

CI failure TestCodeFixToEnableAnalyzerReleaseTracking 😕
Another flaky test? 😄

@sharwell
Copy link
Member Author

Interesting. Looks like that one is a bug in Roslyn; submitted dotnet/roslyn#51244 to fix.

@sharwell sharwell merged commit 9dd75f7 into dotnet:master Feb 16, 2021
@sharwell sharwell deleted the flaky-dispose branch February 16, 2021 19:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky unit test DisposeMethodsShouldCallBaseClassDisposeTests.ErrorCase_NoDiagnostic
3 participants